]> git.baikalelectronics.ru Git - kernel.git/commit
net: neigh: don't call kfree_skb() under spin_lock_irqsave()
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 22 Aug 2022 02:53:46 +0000 (10:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:27:48 +0000 (10:27 +0200)
commit939ce5ebc15ed61e95cf7f13637ea369832135bd
tree1cd27a3f21b1856deb17615a76f02b94b7ca7e3a
parent90bd1964df9822b60b42736fb9e9c6d5c1890ffb
net: neigh: don't call kfree_skb() under spin_lock_irqsave()

commit eea330edf3adff6142bee1caf06d9f4978f00019 upstream.

It is not allowed to call kfree_skb() from hardware interrupt
context or with interrupts being disabled. So add all skb to
a tmp list, then free them after spin_unlock_irqrestore() at
once.

Fixes: 54a94a72973a ("neigh: fix possible DoS due to net iface start/stop loop")
Suggested-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/neighbour.c