]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
libata: only call ->done once all per-tag ressources are released
authorChristoph Hellwig <hch@lst.de>
Thu, 8 Oct 2015 08:25:41 +0000 (10:25 +0200)
committerTejun Heo <tj@kernel.org>
Mon, 12 Oct 2015 17:23:13 +0000 (13:23 -0400)
commit2aa8f5d63d9183ab185364d4ce849566ede0f301
tree75e01ce75cac1abcb883847c18500da83bdef645
parent25c7ce7f7b511fc02b6eef95595af2cea80e2612
libata: only call ->done once all per-tag ressources are released

When calling ->done before releasing resources we could run into a
race where the SCSI midlayer sends another command and races with
the resources beeing manipulated.  For libata this can't currently
happen as synchronization happens at a higher level, but I'd still
like to fix it to future proof libata and to avoid copy & paste
into SCSI drivers where this pattern has led to reproducible crashes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/libata-scsi.c