Re: [PATCH] ublk: snapshot batch commands before preparing I/O
From: Jens Axboe
Date: Thu Jul 02 2026 - 08:32:25 EST
On Tue, 30 Jun 2026 23:18:27 +0200, Yousef Alhouseen wrote:
> The batch prepare path rereads its userspace element array when rolling
> back a partially prepared batch. Userspace can change an already
> processed tag before the second read, causing rollback to reject the
> replacement tag and leave earlier I/O slots prepared. The
> WARN_ON_ONCE() in the rollback path then fires.
>
> Copy the bounded batch into kernel memory before changing any I/O state
> and use the same snapshot for preparation and rollback. Commit and fetch
> batches retain the existing chunked userspace walk.
>
> [...]
Applied, thanks!
[1/1] ublk: snapshot batch commands before preparing I/O
commit: f01f5275feb77bac9fefbbf7cc584fe0b3850a92
Best regards,
--
Jens Axboe