Re: [PATCH] scsi: bsg: copy uring_cmd payload to prevent double-fetch from shared SQE
From: Bart Van Assche
Date: Wed May 27 2026 - 12:12:51 EST
On 5/27/26 3:59 AM, Rahul Chandelkar wrote:
scsi_bsg_uring_cmd() and scsi_bsg_map_user_buffer() read bsg_uring_cmdReviewed-by: Bart Van Assche <bvanassche@xxxxxxx>
fields directly from the shared mmap'd io_uring submission ring via
io_uring_sqe128_cmd(). On the inline execution path, io_uring has not
yet copied the SQE to kernel memory, so a concurrent userspace thread
can modify fields between reads.