]> 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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Aug 2022 08:49:20 +0000 (09:49 +0100)
commiteea330edf3adff6142bee1caf06d9f4978f00019
tree51de6d241f5d5dd53a5bfa36b5762eff45765f2c
parentd44ab2935a64ee3dcc87ec563ca50884c3c4e210
net: neigh: don't call kfree_skb() under spin_lock_irqsave()

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>
net/core/neighbour.c