Re: [PATCH V2] ax25: Fix potential deadlock on &ax25_list_lock

From: Chengfeng Ye
Date: Sat Oct 07 2023 - 11:44:18 EST


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,
Chengfeng