Re: [PATCH v2] net: nfc: fix deadlock between nfc_unregister_device and rfkill_fop_write
From: patchwork-bot+netdevbpf
Date: Sun Dec 28 2025 - 03:35:12 EST
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@xxxxxxxxxx>:
On Thu, 18 Dec 2025 06:53:54 +0530 you wrote:
> A deadlock can occur between nfc_unregister_device() and rfkill_fop_write()
> due to lock ordering inversion between device_lock and rfkill_global_mutex.
>
> The problematic lock order is:
>
> Thread A (rfkill_fop_write):
> rfkill_fop_write()
> mutex_lock(&rfkill_global_mutex)
> rfkill_set_block()
> nfc_rfkill_set_block()
> nfc_dev_down()
> device_lock(&dev->dev) <- waits for device_lock
>
> [...]
Here is the summary with links:
- [v2] net: nfc: fix deadlock between nfc_unregister_device and rfkill_fop_write
https://git.kernel.org/netdev/net/c/1ab526d97a57
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html