aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/proc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-02-01 18:56:08 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-02-01 18:56:08 -0500
commit34229b277480f46c1e9a19f027f30b074512e68b (patch)
tree90d8b43ebceb850b0e7852d75283aebbd2abbc00 /net/sctp/proc.c
parent2c923414d3963b959f65a8a6031972402e6a34a5 (diff)
parent53729eb174c1589f9185340ffe8c10b3f39f3ef3 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "This looks like a lot but it's a mixture of regression fixes as well as fixes for longer standing issues. 1) Fix on-channel cancellation in mac80211, from Johannes Berg. 2) Handle CHECKSUM_COMPLETE properly in xt_TCPMSS netfilter xtables module, from Eric Dumazet. 3) Avoid infinite loop in UDP SO_REUSEPORT logic, also from Eric Dumazet. 4) Avoid a NULL deref if we try to set SO_REUSEPORT after a socket is bound, from Craig Gallek. 5) GRO key comparisons don't take lightweight tunnels into account, from Jesse Gross. 6) Fix struct pid leak via SCM credentials in AF_UNIX, from Eric Dumazet. 7) We need to set the rtnl_link_ops of ipv6 SIT tunnels before we register them, otherwise the NEWLINK netlink message is missing the proper attributes. From Thadeu Lima de Souza Cascardo. 8) Several Spectrum chip bug fixes for mlxsw switch driver, from Ido Schimmel 9) Handle fragments properly in ipv4 easly socket demux, from Eric Dumazet. 10) Don't ignore the ifindex key specifier on ipv6 output route lookups, from Paolo Abeni" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (128 commits) tcp: avoid cwnd undo after receiving ECN irda: fix a potential use-after-free in ircomm_param_request net: tg3: avoid uninitialized variable warning net: nb8800: avoid uninitialized variable warning net: vxge: avoid unused function warnings net: bgmac: clarify CONFIG_BCMA dependency net: hp100: remove unnecessary #ifdefs net: davinci_cpdma: use dma_addr_t for DMA address ipv6/udp: use sticky pktinfo egress ifindex on connect() ipv6: enforce flowi6_oif usage in ip6_dst_lookup_tail() netlink: not trim skb for mmaped socket when dump vxlan: fix a out of bounds access in __vxlan_find_mac net: dsa: mv88e6xxx: fix port VLAN maps fib_trie: Fix shift by 32 in fib_table_lookup net: moxart: use correct accessors for DMA memory ipv4: ipconfig: avoid unused ic_proto_used symbol bnxt_en: Fix crash in bnxt_free_tx_skbs() during tx timeout. bnxt_en: Exclude rx_drop_pkts hw counter from the stack's rx_dropped counter. bnxt_en: Ring free response from close path should use completion ring net_sched: drr: check for NULL pointer in drr_dequeue ...
Diffstat (limited to 'net/sctp/proc.c')
-rw-r--r--net/sctp/proc.c12
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