Re: [PATCH v2 08/14] ublk: don't take ublk_queue in ublk_unregister_io_buf()
From: Ming Lei <hidden>
Date: 2025-06-23 08:29:52
From: Ming Lei <hidden>
Date: 2025-06-23 08:29:52
On Fri, Jun 20, 2025 at 09:10:02AM -0600, Caleb Sander Mateos wrote:
UBLK_IO_UNREGISTER_IO_BUF currently requires a valid q_id and tag to be passed in the ublksrv_io_cmd. However, only the addr (registered buffer index) is actually used to unregister the buffer. There is no check that the q_id and tag are for the ublk request whose buffer is registered at the given index. To prepare to allow userspace to omit the q_id and tag, check the UBLK_F_SUPPORT_ZERO_COPY flag on the ublk_device instead of the ublk_queue. Signed-off-by: Caleb Sander Mateos <redacted>
Reviewed-by: Ming Lei <redacted> Thanks, Ming