]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Feb 2026 23:01:41 +0000 (15:01 -0800)
commitb5ef7d09ef97b39a7a806f7f6f8bd9693fd2a18c
tree441a3b57dec77f91d1a5bc842b5e7ed67dcf93ef
parent21e0d7a15a789e99be89231dae25cb6ffc482a7c
ata: libata-core: fix cancellation of a port deferred qc work

commit 55db009926634b20955bd8abbee921adbc8d2cb4 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ata/libata-core.c