summaryrefslogtreecommitdiffstats
path: root/net/llc
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2018-09-11 20:42:06 +0200
committerDavid S. Miller <davem@davemloft.net>2018-09-13 18:04:58 +0200
commit9708d2b5b7c648e8e0a40d11e8cea12f6277f33c (patch)
treea207afe8c890c86e413dac645478fd282b6277cb /net/llc
parentipv6: Add sockopt IPV6_MULTICAST_ALL analogue to IP_MULTICAST_ALL (diff)
downloadlinux-9708d2b5b7c648e8e0a40d11e8cea12f6277f33c.tar.xz
linux-9708d2b5b7c648e8e0a40d11e8cea12f6277f33c.zip
llc: avoid blocking in llc_sap_close()
llc_sap_close() is called by llc_sap_put() which could be called in BH context in llc_rcv(). We can't block in BH. There is no reason to block it here, kfree_rcu() should be sufficient. Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/llc')
-rw-r--r--net/llc/llc_core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/llc/llc_core.c b/net/llc/llc_core.c
index 260b3dc1b4a2..64d4bef04e73 100644
--- a/net/llc/llc_core.c
+++ b/net/llc/llc_core.c
@@ -127,9 +127,7 @@ void llc_sap_close(struct llc_sap *sap)
list_del_rcu(&sap->node);
spin_unlock_bh(&llc_sap_list_lock);
- synchronize_rcu();
-
- kfree(sap);
+ kfree_rcu(sap, rcu);
}
static struct packet_type llc_packet_type __read_mostly = {