net: neigh: don't call kfree_skb() under spin_lock_irqsave()
stable inclusion from stable-v5.10.141 commit bdc786d737ec0eac92131d76372cd7f29c1e02e6 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I685FC Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bdc786d737ec0eac92131d76372cd7f29c1e02e6 -------------------------------- commit d5485d9d 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: 66ba215c ("neigh: fix possible DoS due to net iface start/stop loop") Suggested-by: NDenis V. Lunev <den@openvz.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Reviewed-by: NNikolay Aleksandrov <razor@blackwall.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com> Reviewed-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录