diff options
Diffstat (limited to 'net/sctp/proc.c')
-rw-r--r-- | net/sctp/proc.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 684c5b31563b..ded7d931a6a5 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
@@ -165,8 +165,6 @@ static void sctp_seq_dump_remote_addrs(struct seq_file *seq, struct sctp_associa | |||
165 | list_for_each_entry_rcu(transport, &assoc->peer.transport_addr_list, | 165 | list_for_each_entry_rcu(transport, &assoc->peer.transport_addr_list, |
166 | transports) { | 166 | transports) { |
167 | addr = &transport->ipaddr; | 167 | addr = &transport->ipaddr; |
168 | if (transport->dead) | ||
169 | continue; | ||
170 | 168 | ||
171 | af = sctp_get_af_specific(addr->sa.sa_family); | 169 | af = sctp_get_af_specific(addr->sa.sa_family); |
172 | if (af->cmp_addr(addr, primary)) { | 170 | if (af->cmp_addr(addr, primary)) { |
@@ -380,6 +378,8 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v) | |||
380 | } | 378 | } |
381 | 379 | ||
382 | transport = (struct sctp_transport *)v; | 380 | transport = (struct sctp_transport *)v; |
381 | if (!sctp_transport_hold(transport)) | ||
382 | return 0; | ||
383 | assoc = transport->asoc; | 383 | assoc = transport->asoc; |
384 | epb = &assoc->base; | 384 | epb = &assoc->base; |
385 | sk = epb->sk; | 385 | sk = epb->sk; |
@@ -412,6 +412,8 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v) | |||
412 | sk->sk_rcvbuf); | 412 | sk->sk_rcvbuf); |
413 | seq_printf(seq, "\n"); | 413 | seq_printf(seq, "\n"); |
414 | 414 | ||
415 | sctp_transport_put(transport); | ||
416 | |||
415 | return 0; | 417 | return 0; |
416 | } | 418 | } |
417 | 419 | ||
@@ -489,12 +491,12 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v) | |||
489 | } | 491 | } |
490 | 492 | ||
491 | tsp = (struct sctp_transport *)v; | 493 | tsp = (struct sctp_transport *)v; |
494 | if (!sctp_transport_hold(tsp)) | ||
495 | return 0; | ||
492 | assoc = tsp->asoc; | 496 | assoc = tsp->asoc; |
493 | 497 | ||
494 | list_for_each_entry_rcu(tsp, &assoc->peer.transport_addr_list, | 498 | list_for_each_entry_rcu(tsp, &assoc->peer.transport_addr_list, |
495 | transports) { | 499 | transports) { |
496 | if (tsp->dead) | ||
497 | continue; | ||
498 | /* | 500 | /* |
499 | * The remote address (ADDR) | 501 | * The remote address (ADDR) |
500 | */ | 502 | */ |
@@ -544,6 +546,8 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v) | |||
544 | seq_printf(seq, "\n"); | 546 | seq_printf(seq, "\n"); |
545 | } | 547 | } |
546 | 548 | ||
549 | sctp_transport_put(tsp); | ||
550 | |||
547 | return 0; | 551 | return 0; |
548 | } | 552 | } |
549 | 553 | ||