aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc/call_object.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-02 14:03:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-02 14:03:34 -0400
commitea9866793d1e925b4d320eaea409263b2a568f38 (patch)
tree39b749b2c82febfcebb89706121d4f5781fffc1b /net/rxrpc/call_object.c
parent5ce3307b6d9d25fe3c62e4749821f5e58f9161db (diff)
parent4dd2b82d5adfbe0b1587ccad7a8f76d826120f37 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Out of bounds access in xfrm IPSEC policy unlink, from Yue Haibing. 2) Missing length check for esp4 UDP encap, from Sabrina Dubroca. 3) Fix byte order of RX STBC access in mac80211, from Johannes Berg. 4) Inifnite loop in bpftool map create, from Alban Crequy. 5) Register mark fix in ebpf verifier after pkt/null checks, from Paul Chaignon. 6) Properly use rcu_dereference_sk_user_data in L2TP code, from Eric Dumazet. 7) Buffer overrun in marvell phy driver, from Andrew Lunn. 8) Several crash and statistics handling fixes to bnxt_en driver, from Michael Chan and Vasundhara Volam. 9) Several fixes to the TLS layer from Jakub Kicinski (copying negative amounts of data in reencrypt, reencrypt frag copying, blind nskb->sk NULL deref, etc). 10) Several UDP GRO fixes, from Paolo Abeni and Eric Dumazet. 11) PID/UID checks on ipv6 flow labels are inverted, from Willem de Bruijn. 12) Use after free in l2tp, from Eric Dumazet. 13) IPV6 route destroy races, also from Eric Dumazet. 14) SCTP state machine can erroneously run recursively, fix from Xin Long. 15) Adjust AF_PACKET msg_name length checks, add padding bytes if necessary. From Willem de Bruijn. 16) Preserve skb_iif, so that forwarded packets have consistent values even if fragmentation is involved. From Shmulik Ladkani. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (69 commits) udp: fix GRO packet of death ipv6: A few fixes on dereferencing rt->from rds: ib: force endiannes annotation selftests: fib_rule_tests: print the result and return 1 if any tests failed ipv4: ip_do_fragment: Preserve skb_iif during fragmentation net/tls: avoid NULL pointer deref on nskb->sk in fallback selftests: fib_rule_tests: Fix icmp proto with ipv6 packet: validate msg_namelen in send directly packet: in recvmsg msg_name return at least sizeof sockaddr_ll sctp: avoid running the sctp state machine recursively stmmac: pci: Fix typo in IOT2000 comment Documentation: fix netdev-FAQ.rst markup warning ipv6: fix races in ip6_dst_destroy() l2ip: fix possible use-after-free appletalk: Set error code if register_snap_client failed net: dsa: bcm_sf2: fix buffer overflow doing set_rxnfc rxrpc: Fix net namespace cleanup ipv6/flowlabel: wait rcu grace period before put_pid() vrf: Use orig netdev to count Ip6InNoRoutes and a fresh route lookup when sending dest unreach tcp: add sanity tests in tcp_add_backlog() ...
Diffstat (limited to 'net/rxrpc/call_object.c')
-rw-r--r--net/rxrpc/call_object.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c
index 8aa2937b069f..fe96881a334d 100644
--- a/net/rxrpc/call_object.c
+++ b/net/rxrpc/call_object.c
@@ -604,30 +604,30 @@ void rxrpc_destroy_all_calls(struct rxrpc_net *rxnet)
604 604
605 _enter(""); 605 _enter("");
606 606
607 if (list_empty(&rxnet->calls)) 607 if (!list_empty(&rxnet->calls)) {
608 return; 608 write_lock(&rxnet->call_lock);
609 609
610 write_lock(&rxnet->call_lock); 610 while (!list_empty(&rxnet->calls)) {
611 call = list_entry(rxnet->calls.next,
612 struct rxrpc_call, link);
613 _debug("Zapping call %p", call);
611 614
612 while (!list_empty(&rxnet->calls)) { 615 rxrpc_see_call(call);
613 call = list_entry(rxnet->calls.next, struct rxrpc_call, link); 616 list_del_init(&call->link);
614 _debug("Zapping call %p", call);
615 617
616 rxrpc_see_call(call); 618 pr_err("Call %p still in use (%d,%s,%lx,%lx)!\n",
617 list_del_init(&call->link); 619 call, atomic_read(&call->usage),
620 rxrpc_call_states[call->state],
621 call->flags, call->events);
618 622
619 pr_err("Call %p still in use (%d,%s,%lx,%lx)!\n", 623 write_unlock(&rxnet->call_lock);
620 call, atomic_read(&call->usage), 624 cond_resched();
621 rxrpc_call_states[call->state], 625 write_lock(&rxnet->call_lock);
622 call->flags, call->events); 626 }
623 627
624 write_unlock(&rxnet->call_lock); 628 write_unlock(&rxnet->call_lock);
625 cond_resched();
626 write_lock(&rxnet->call_lock);
627 } 629 }
628 630
629 write_unlock(&rxnet->call_lock);
630
631 atomic_dec(&rxnet->nr_calls); 631 atomic_dec(&rxnet->nr_calls);
632 wait_var_event(&rxnet->nr_calls, !atomic_read(&rxnet->nr_calls)); 632 wait_var_event(&rxnet->nr_calls, !atomic_read(&rxnet->nr_calls));
633} 633}