From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A1BF822B587 for ; Thu, 17 Apr 2025 10:32:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744885957; cv=none; b=K0w/lEvFEU0sO6t97hq+2foLTzZEU+A7M2KVMw5nG06R1BRhn+7LAVUymPw03lqIzF1MISb9lZziMeHZBRepKc6TQMaCVDkuVsg57J1G7nt4w4E7tI6CRFuZGQegbwHEX/5WIuZDbampySTUU5RuKBj5sylTuaxvvbdVX/09x3A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744885957; c=relaxed/simple; bh=wyfz48BOMsN5Q4gSJ6LBBuf0dUyIm9iyXoDuCHnyg9s=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=CCxaMUzImcsEz7Ne2edYf0aSidADlAYNkXLOwOaidPtmOCKUiwBQYk2qz+meId5RgI6tRg/efRFvwm3t0/qrLeubsCGZdAW0v/zru3evnA/zomSlu1kDGRzt+CQ33xhCy/32JrXyYczxLzcon7RBW+TTUk78qg4LwGHZevoptHw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZUn/d7E7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ZUn/d7E7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7728C4CEE4; Thu, 17 Apr 2025 10:32:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744885957; bh=wyfz48BOMsN5Q4gSJ6LBBuf0dUyIm9iyXoDuCHnyg9s=; h=Subject:To:Cc:From:Date:From; b=ZUn/d7E7OggECcKv0opi817PDE+6lxwKLuB2vDyuVmDEMujgP7WKpbCIj/g6J4ymu hqe+Ha4DTWgCZVzySQeKsq4E9uwFZF/2VIPVQT6YvBKpZPjvCjIaMfaVijW9TBVFM9 MkSiYS09m+V99p99lYDlYlqgkqucpUqCDixA7ovY= Subject: FAILED: patch "[PATCH] block: make sure ->nr_integrity_segments is cloned in" failed to apply to 5.15-stable tree To: ming.lei@redhat.com,axboe@kernel.dk,hch@infradead.org,hch@lst.de Cc: From: Date: Thu, 17 Apr 2025 12:32:17 +0200 Message-ID: <2025041717-saturday-impale-6394@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y git checkout FETCH_HEAD git cherry-pick -x fc0e982b8a3a169b1c654d9a1aa45bf292943ef2 # git commit -s git send-email --to '' --in-reply-to '2025041717-saturday-impale-6394@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From fc0e982b8a3a169b1c654d9a1aa45bf292943ef2 Mon Sep 17 00:00:00 2001 From: Ming Lei Date: Mon, 10 Mar 2025 19:54:53 +0800 Subject: [PATCH] block: make sure ->nr_integrity_segments is cloned in blk_rq_prep_clone Make sure ->nr_integrity_segments is cloned in blk_rq_prep_clone(), otherwise requests cloned by device-mapper multipath will not have the proper nr_integrity_segments values set, then BUG() is hit from sg_alloc_table_chained(). Fixes: b0fd271d5fba ("block: add request clone interface (v2)") Cc: stable@vger.kernel.org Cc: Christoph Hellwig Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250310115453.2271109-1-ming.lei@redhat.com Signed-off-by: Jens Axboe diff --git a/block/blk-mq.c b/block/blk-mq.c index b9550a127c8e..f1030d589a1b 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -3314,6 +3314,7 @@ int blk_rq_prep_clone(struct request *rq, struct request *rq_src, rq->special_vec = rq_src->special_vec; } rq->nr_phys_segments = rq_src->nr_phys_segments; + rq->nr_integrity_segments = rq_src->nr_integrity_segments; if (rq->bio && blk_crypto_rq_bio_prep(rq, rq->bio, gfp_mask) < 0) goto free_and_out;