Re: [PATCH net v2 RESEND] net: neigh: don't call kfree_skb() under spin_lock_irqsave()

From: Nikolay Aleksandrov
Date: Mon Aug 22 2022 - 03:50:11 EST


On 22/08/2022 05:53, Yang Yingliang wrote:
> 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: 66ba215cb513 ("neigh: fix possible DoS due to net iface start/stop loop")
> Suggested-by: Denis V. Lunev <den@xxxxxxxxxx>
> Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
> ---
> v2:
> move all skb to a tmp list, then free them after spin_unlock_irqrestore().
> ---
> net/core/neighbour.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>

LGTM,
Reviewed-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>