From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.24 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796160869; b=qOU+by46od1lTkHa7Tv74hEMRW+8lLGAhOw3pXzOujLHh6CnEIOmdXPEAIupnccNSqI1 SiE+zfakjZmLCciyHcGirE1kDkid8+oFHNNA6p/0BFBvfoxr53bA3f8CYXxBdn4rQ92W5 SR7LPKGlD/KqEN6GD6Hy3Hb4iUTwqBVOxfInX3X4GP9AjZYr/9mnCQsC66UEcJoaBqQX5 asTG8Sd5EJRnryMBOIOrOPVxiTPjbZB009OW+O3fEiw7A62LngmxE5ZVvdeLuq+f+dk2A sg/zVSTlY+sMjoObNgGPK8Op0KaMuSASdcCMJtrqo5hs7Iie6FZcre8e66XUde80Q9g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796160869; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=S6UyIG/qtmmz+gS5dhwP4NDtUXqfLbuTahCTWX1UCZU=; b=ksQ7Ail4y+vYusVoEwOJxkopHUEIp4OjcYP6hI1UIi+2g8Yth2o4FPntX1jfwz1zbW7d HFCoX3o0cFjT7rd58igYy/XJyblMoCw5S8fNHNz7RWBdX1/G4HwqXTduM/8c0HagjGIMx +Ef9j0P/fnE43bJqwoCQ4/qlo3Y3q4eRVHKYWy682xzUE7ceMWRDxQGrZhMo0WBw0sWu0 t1g/AnlNdlPIZARAmYPD1Y4R0ekssDf+Iw3SmAGXFEDAU+NLKoGb4OOg7BGWNmK8gJGLz XEEtVCvwFOVKV91PFWqK0mKKLqCRv4/cC7SF9IFYjK5ZfSC3Ij/6zknd9oJHbGZVOKQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; arc=none smtp.remote-ip=91.218.175.24 Received: from mta0.migadu.com (out-24.mta0.migadu.com [91.218.175.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 870A2606A31A for ; Tue, 1 Dec 2026 21:34:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 870A2606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=PpCRkYPkJOS3HSfvXiAsPk53ceuUnwsLwZBUcsVtWBM=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796160861; v=1; x=1796765661; b=uPwgPhYCkdWqUWoQUo0x0V7waSdIXl4XS8pAiVq2ekhBv3qDCMXm4Zpa8mH4ISVhzerrnL0V PgGnkFdT36tFjWIogSO1PFAc+zBV8rPCl/jKZPICsHw93nRmtW7BqQB+O0rVk07K24eQMcd5xGx FkpWvVQey0WTo2RunkUbxaM4= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id bde0ddbfb4fa300c; Tue, 01 Dec 2026 21:34:21 +0000 X-Mizu-Trace-ID: bde0ddbfb4fa300c X-Migadu-Flow: FLOW_OUT Message-ID: Date: Tue, 1 Dec 2026 22:34:16 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [v4 0/3] block: delay support for error injection To: Christoph Hellwig , Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Keith Busch , Jonathan Corbet , linux-doc@vger.kernel.org References: <20261111215838.103356-1-haris.iqbal@linux.dev> <179501806989.17649.3138860274842922761.b4-ty@b4> <20261120164416.GA32719@lst.de> <1cf30693-44c6-4761-9900-e36259082e4e@kernel.dk> <20261126083421.GA7403@lst.de> <970946a8-855e-4d65-97d9-71c7cb2ceb20@kernel.dk> <20261130080659.GA8222@lst.de> Content-Language: en-US From: Haris Iqbal In-Reply-To: <20261130080659.GA8222@lst.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/30/26 09:06, Christoph Hellwig wrote: > On Thu, Nov 26, 2026 at 08:29:46AM -0700, Jens Axboe wrote: >> Gah, yes that is certainly a mistake, in my mind I had it staged for 7.5 >> of course. But looks like that ship sailed, as it's now in Linus's tree >> as well as part of updates from last week. How broken is this right now, >> in terms of what fix(es) we need? We can always just disable it. For >> 7.5, we can just pull in the block-7.4 branch and resolve the conflicts >> that way, fairly straight forward and usual approach. > > The sashiko report is here: > > https://sashiko.dev/#/patchset/20261111215838.103356-1-haris.iqbal%40linux.dev > > The main issue is bios outliving the gendisks. Which feels like it > could be hit relatively easily, and might even happen for typical > test case uses. Of course none of this matters if you don't use > the new feature, but I think sending a revert to Linus and then > reapplying it in 7.5 is probably the best. I was looking into the report and the scenarios, and I think part of this is real, but I'm not sure the rest can happen. The delayed bio is resubmitted through submit_bio_noacct_nocheck(), which skips bio_check_eod(). If the disk is removed while the bio waits, I think the bio can still reach the driver on sd/sr, because their queue is unfrozen again after del_gendisk(). So this part makes sense and I think failing the bio in the work when GD_DEAD should fix it. I don't think the use-after-free through nvme multipath can happen. Path disks are hidden, so their bdev is never added and disk_live() is false, and error_inject_add() returns -ENODEV for a disk that isn't live. I tried it with nvme-loop: writing a rule to the path disk's eror_injection file fails with ENODEV. If that's right, a bio is never delayed on a path disk, only on the head disk. So I'm thinking of adding just the GD_DEAD check. One thing I'd like an opinion on: a delayed bio holds no q_usage_counter, so del_gendisk() doesn't wait for it, and only the issuer's open keeps the disk allocated. Is that fine to rely on, or should the delayed bio take its own reference on the bdev (and the driver module) for the duration of the delay?