From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5429D47D933 for ; Thu, 2 Jul 2026 12:28:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782995323; cv=none; b=b8DnKGTAzE7InEUpz7D6bmuzIsmMus6x2RbhdFCYbOeNXIIYmaLE2RI9bTiC3UnMAewoL/lTqLceTyiuSj1sTCDqrjZG0y+G4Q79GsaPUWpVOS/WfaqS2qFlmwkzHV7x/Pwo7lp8JEDk8ZYXGu8N1NF4TOPz+K+Wm10asYRlmFM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782995323; c=relaxed/simple; bh=ruYmtGd3FKJO9r+U3ejdHzLwnzkjaC9rxSO+Rb1MDMM=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=VUOrzhx9YtZbjxjabY7aTLJabQEfE+oqv0o83UY0WRrLCO6Ct1q723cZSrR26s+HyIlAeeYpxBU9MkiQEmsXj/KudH/B0nGWERGDQfgpD0hyyCfGNfVUZWc7UeHpbN3UscVGkJw+snaPp5pxeZTkmKfWhpBhWQk2RszHR/NEs2I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20251104.gappssmtp.com header.i=@kernel-dk.20251104.gappssmtp.com header.b=PeVU59fr; arc=none smtp.client-ip=209.85.161.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20251104.gappssmtp.com header.i=@kernel-dk.20251104.gappssmtp.com header.b="PeVU59fr" Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-69ec2ebec61so1162391eaf.3 for ; Thu, 02 Jul 2026 05:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20251104.gappssmtp.com; s=20251104; t=1782995321; x=1783600121; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:date:message-id :subject:references:in-reply-to:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=s/mTbWKm6JkXqziF6Zm2uc3WYcekUTsmBhoLn827wYs=; b=PeVU59frIKU+vjfFvZWgLOg6su0VENJwM1QYP/LkL0m5SUUXT2PGDe1myCMnIOubJn NKn8jtftPWL6dF6kL5wCNIauWQKo7u/mnX+V50X6+y5+9GUXk+qjNrAZ1JkjtkcE94OZ +SjGkdYvC/lizOxdsvOOCuFffeeUSG3hkeMskK5WCkFUR26QGMCwzL89EYYF2P45gIFt 53ZQh5tlFWbg3EKwNc42EXHBFXYOYeCKc/VkY82coIJ/6qTm3SWtcxk6J0Px1gOXWH9s OCdp1o4+YPVCAVlG9Q1dx1CBLCL7Dze1SHGfiMM8tok61ZzfJnaDADTCxRmXtqkidKSJ cxyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782995321; x=1783600121; h=content-transfer-encoding:content-type:mime-version:date:message-id :subject:references:in-reply-to:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=s/mTbWKm6JkXqziF6Zm2uc3WYcekUTsmBhoLn827wYs=; b=L1nFsSKNbbNJdH776NRHAtF4PqiGVyBKNUnp+n0l3apOONnty6d8cqHQYZkwEav+Ef Nki3xM8ZEVqCGHeDRBHVVNJ0rJLS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5398 with SMTP id 006d021491bc7-6a30d745473mr2946928eaf.4.1782995321326; Thu, 02 Jul 2026 05:28:41 -0700 (PDT) Received: from [127.0.0.1] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-44cbe84efefsm2623259fac.2.2026.07.02.05.28.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2026 05:28:40 -0700 (PDT) From: Jens Axboe To: Ming Lei , Yousef Alhouseen Cc: Caleb Sander Mateos , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+1a67ee1aa79484801ec6@syzkaller.appspotmail.com In-Reply-To: <20260630211827.50475-1-alhouseenyousef@gmail.com> References: <20260630211827.50475-1-alhouseenyousef@gmail.com> Subject: Re: [PATCH] ublk: snapshot batch commands before preparing I/O Message-Id: <178299532009.108615.15257400425085643970.b4-ty@b4> Date: Thu, 02 Jul 2026 06:28:40 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.15.2 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