]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: target: tcm_loop: Fix wrong abort tag
authorGuixin Liu <kanie@linux.alibaba.com>
Thu, 13 Mar 2025 01:47:27 +0000 (09:47 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 18 Mar 2025 02:04:21 +0000 (22:04 -0400)
commit1909b643034ef741af9f24a57ab735440c4b5d1a
treee96d1e1154ed58ac7380e0344dc344fdbdf7079f
parent040492ac2578b66d3ff4dcefb4f56811634de53d
scsi: target: tcm_loop: Fix wrong abort tag

When the tcm_loop_nr_hw_queues is set to a value greater than 1, the
tags of requests in the block layer are no longer unique. This may lead
to erroneous aborting of commands with the same tag. The issue can be
resolved by using blk_mq_unique_tag to generate globally unique
identifiers by combining the hardware queue index and per-queue tags.

Fixes: 6375f8908255 ("tcm_loop: Fixup tag handling")
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Link: https://lore.kernel.org/r/20250313014728.105849-1-kanie@linux.alibaba.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/loopback/tcm_loop.c