]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ata: libata-core: fix cancellation of a port deferred qc work
authorDamien Le Moal <dlemoal@kernel.org>
Fri, 20 Feb 2026 03:09:12 +0000 (12:09 +0900)
committerDamien Le Moal <dlemoal@kernel.org>
Tue, 24 Feb 2026 00:38:55 +0000 (09:38 +0900)
commit55db009926634b20955bd8abbee921adbc8d2cb4
tree8e9d579082fb17a02ab0f9578af892e193c96380
parenteddb98ad9364b4e778768785d46cfab04ce52100
ata: libata-core: fix cancellation of a port deferred qc work

cancel_work_sync() is a sleeping function so it cannot be called with
the spin lock of a port being held. Move the call to this function in
ata_port_detach() after EH completes, with the port lock released,
together with other work cancellation calls.

Fixes: 0ea84089dbf6 ("ata: libata-scsi: avoid Non-NCQ command starvation")
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Igor Pylypiv <ipylypiv@google.com>
drivers/ata/libata-core.c