[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZSQUdhzSDpAlaeXK@kernel.org>
Date: Mon, 9 Oct 2023 16:55:50 +0200
From: Simon Horman <horms@...nel.org>
To: Chengfeng Ye <dg573847474@...il.com>
Cc: jreuter@...na.de, ralf@...ux-mips.org, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
linux-hams@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] ax25: Fix potential deadlock on &ax25_list_lock
On Sat, Oct 07, 2023 at 11:43:59PM +0800, Chengfeng Ye wrote:
> Hi Simon Horman,
>
> I think maybe not. My static analysis tool only reported this function, I
> also just manually checked the spin_lock(&ax25_list_lock) in other
> functions, and it looks like they are basically under rcv callback or timer,
> which already have BH disabled. I think the developers who wrote
> the code should be aware of this so they used spin_lock() instead of
> spin_lock_bh().
>
> But the fixed function is a bit different, as it could be called from .ioctl(),
> which is from userland syscall and executes under the process
> context, and along the call chain BH is also not disabled explicitly. That's
> the reason why only at this place I change to spin_lock_bh().
Thanks,
I agree that seems to be the case.
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists