diff options
| author | Yingjie Wang <x-professor@outlook.com> | 2026-10-23 16:23:06 +0000 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-10-30 21:08:02 -0400 |
| commit | ffb7b533a47906b96166eec4b7eaa4199b7a7462 (patch) | |
| tree | d460858f26a52d1d69fa3ac54aefd20823b49527 /scripts/dummy-tools/python3 | |
| parent | a52f2ad45726d788755b525adcf51f65a6b836ff (diff) | |
scsi: bsg: Report io_uring data copyback failures
scsi_bsg_uring_task_cb() discards the result of blk_rq_unmap_user(). For a
data-in command that uses a bounce buffer, the task work can therefore post
a CQE with res == 0 despite a copyback failure.
Use the unmap result as the CQE status. A later sense-buffer copy failure
continues to take precedence.
On x86_64, a raw BSG INQUIRY into an unaligned anonymous PROT_NONE mapping
posted a CQE with res == 0 in 20/20 runs before this change and res ==
-EFAULT in 20/20 runs afterward. Writable controls succeeded in 20/20 runs
on both kernels.
Fixes: 7b6d3255e7f8 ("scsi: bsg: add io_uring passthrough handler")
Cc: stable@vger.kernel.org
Signed-off-by: Yingjie Wang <x-professor@outlook.com>
Reviewed-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/0b35d2d46bf8ff9f2dbba83ae093d17351e950e9.1792772194.git.x-professor@outlook.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'scripts/dummy-tools/python3')
0 files changed, 0 insertions, 0 deletions
