From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a6-smtp.messagingengine.com (fout-a6-smtp.messagingengine.com [103.168.172.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF4F13A759D for ; Wed, 15 Jul 2026 04:48:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784090890; cv=none; b=aJzN03eKSlG6JoZ8CC22RutNWh0auUNBqrJXnngkseLATfDe2kpD+R3bKcYBZrCi7t+N1hCIL7be/7QuAM/fuO++N9ugJtx05XislqF/hN+dfFx5e++wEjYEXhCvE00iVbJfGbTaZ1GmUJToDGfihBl7uLRkmu/dYTMzuYvuefg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784090890; c=relaxed/simple; bh=urCCCrkAkRNTc29dTxHX6weFSI5TZpYKP7wtj9CkgsE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ixg/zCNjMrqFRvFfuKWzfcRXgNP1B4f7nysOz25CneifUfbh9w1xpJRtlsIFOyrbtPJKaNZ233rbZho2WWOWkBVuCZkHTeiun++5sV1HYPy1mEHFgu4BkaFPb/gqm6/31/U6WPQf+n1buO3L/vOtsxuMohH61754Fyq79r5pyXU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com; spf=pass smtp.mailfrom=kroah.com; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b=asG/fVw2; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=HAlJCKAR; arc=none smtp.client-ip=103.168.172.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kroah.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="asG/fVw2"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="HAlJCKAR" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 680C6EC01A9; Wed, 15 Jul 2026 00:48:06 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Wed, 15 Jul 2026 00:48:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1784090886; x=1784177286; bh=/0yz9iuK1r 8V8zVCw0YNU5t1vxpOX5KPTrGyIK6i060=; b=asG/fVw2YHgmB4SEYevq8WGxt2 nOgcb5RvpMzos7vIDZE9t+JEY1REKG6ybvRjBhwtcOsjjNiXy3Mx2RirhgFuGYga kdDk15xSCvHtVDteULQ+GqKa2cnc2ZZVmxB5GAUESgXCv6IsSzE2z5CRBW0Iq9ZJ MkDC4FMezyOgzxxUD/QmsQKwC9kmKDafM5ieb8pjGt9R/rF7s++MobkluyMm4J5m AxNZ1tNMas4w4pTRzwSAD+izSp0dxPn0SfhYsBUL4qaFSJ/yhoq/AcLH+7JLXiMb y1GzbG37yP07GF7AAWp6yb2RJoQCGDD7Knf4UV1jZqT12vTl5+8EYh5VucIA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1784090886; x=1784177286; bh=/0yz9iuK1r8V8zVCw0YNU5t1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30U/R1+O6+jNwHFAn9g X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Jul 2026 00:48:05 -0400 (EDT) Date: Wed, 15 Jul 2026 06:48:00 +0200 From: Greg KH To: Chao S Cc: stable@vger.kernel.org, Weidong Zhu Subject: Re: Please backport 49f06cff50a4 ("block: skip sync_blockdev() on surprise removal in bdev_mark_dead()") to 6.6.y, 6.12.y, 6.18.y Message-ID: <2026071548-remember-handling-8672@gregkh> References: Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jul 14, 2026 at 05:20:19PM -0400, Chao S wrote: > Hi stable team, > > Please consider the following mainline commit for the stable trees: > > commit 49f06cff50a4ccf3b7a1a662ceb892b3b21a527a > Author: Chao Shi > "block: skip sync_blockdev() on surprise removal in bdev_mark_dead()" > > Why it should be applied: > On surprise removal (@surprise == true) the device is already gone, but the > bare block-device path in bdev_mark_dead() (no ->mark_dead holder op) calls > sync_blockdev() unconditionally. It can then hang forever in > folio_wait_writeback() waiting on writeback that can never complete. We hit > this via nvme_reset_work()'s "I/O queues lost" path > (nvme_mark_namespaces_dead -> blk_mark_disk_dead -> bdev_mark_dead(bdev, true)), > which wedges the reset worker and every task serialized behind it -- an > unrecoverable hung-task/DoS (multiple tasks blocked >120s, reproduced several > times under fuzzing). The fix simply skips the futile sync on surprise removal, > matching fs_bdev_mark_dead(); invalidate_bdev() still runs and orderly removal > is unchanged. > > Affected versions: > Fixes: d8530de5a6e8 ("block: call into the file system for bdev_mark_dead") > which first shipped in v6.6 (it dropped the pre-existing !surprise guard from > the bare-bdev path). So the bug is present in v6.6 through the fix. > v7.0+ already > carries the fix, and pre-6.6 trees still have the original guard, so > this is only > needed for the 6.6.y, 6.12.y and 6.18.y stable trees. > > The change is a self-contained one-line guard (plus a comment) in > bdev_mark_dead() > and should cherry-pick cleanly onto all three; happy to send adjusted backports > if any tree conflicts. We need a 6.6.y backport as it does not apply cleanly there. thanks, greg k-h