Re: [PATCH] xfrm: Use spin_lock_bh() in xfrm_input()

From: Steffen Klassert
Date: Mon Dec 18 2023 - 06:24:54 EST


On Mon, Dec 18, 2023 at 12:07:50PM +0100, Eric Dumazet wrote:
> On Mon, Dec 18, 2023 at 9:43 AM Zhang Yiqun <zhangyiqun@xxxxxxxxxxxxxx> wrote:
> >
> > This patch is to change spin_lock() into spin_lock_bh(), which can
> > disable bottem half in calling. If we leave this as spin_lock(),
> > it may stuck in a deadlock, because the callback in bottem half in
> > crypto driver will also call xfrm_input() again.
> >
> > Signed-off-by: Zhang Yiqun <zhangyiqun@xxxxxxxxxxxxxx>
>
> When was the bug added ?
> We need a FIxes: tag.

This looks more like a 'crypto driver' bug. xfrm_input() runs in
the RX path and therefore expects to run with BHs off.