On 18/12/2025 02:23, Deepanshu Kartikey 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
Reviewed-by: Krzysztof Kozlowski krzysztof.kozlowski@oss.qualcomm.com
Best regards, Krzysztof