From: <gregkh@linuxfoundation.org>
To: kanie@linux.alibaba.com,hare@kernel.org,hch@lst.de,kbusch@kernel.org,nilay@linux.ibm.com
Cc: <stable@vger.kernel.org>
Subject: FAILED: patch "[PATCH] nvmet: use GFP_KERNEL for PR allocations" failed to apply to 6.18-stable tree
Date: Wed, 02 Dec 2026 14:52:31 +0100 [thread overview]
Message-ID: <2026120231-footprint-eligible-a023@gregkh> (raw)
The patch below does not apply to the 6.18-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 <stable@vger.kernel.org>.
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-6.18.y
git checkout FETCH_HEAD
git cherry-pick -x 976311c5594a7a26047891f087ad59a804e02baa
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026120231-footprint-eligible-a023@gregkh' --subject-prefix 'PATCH 6.18.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 976311c5594a7a26047891f087ad59a804e02baa Mon Sep 17 00:00:00 2001
From: Guixin Liu <kanie@linux.alibaba.com>
Date: Mon, 9 Nov 2026 10:26:46 +0800
Subject: [PATCH] nvmet: use GFP_KERNEL for PR allocations
nvmet_pr_update_reg_attr() and nvmet_pr_alloc_and_insert_pc_ref()
allocate with GFP_ATOMIC, but both run in sleepable context: the PR
command handlers execute from the transport workqueues and take the
pr_sem semaphore, and the pc_ref allocation is reached from the
connect and configfs paths. The latter function even passes
GFP_KERNEL to the percpu_ref_init() in the same scope, so the
GFP_ATOMIC only raises the failure rate for no reason.
Switch both allocations to GFP_KERNEL.
Fixes: 5a47c2080a73 ("nvmet: support reservation feature")
Cc: stable@vger.kernel.org
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
diff --git a/drivers/nvme/target/pr.c b/drivers/nvme/target/pr.c
index b860cbe192cd..8c818f24815b 100644
--- a/drivers/nvme/target/pr.c
+++ b/drivers/nvme/target/pr.c
@@ -341,7 +341,7 @@ static u16 nvmet_pr_update_reg_attr(struct nvmet_pr *pr,
return NVME_SC_SUCCESS;
}
- new = kmalloc_obj(*new, GFP_ATOMIC);
+ new = kmalloc_obj(*new, GFP_KERNEL);
if (!new)
return NVME_SC_INTERNAL;
@@ -1046,7 +1046,7 @@ static int nvmet_pr_alloc_and_insert_pc_ref(struct nvmet_ns *ns,
struct nvmet_pr_per_ctrl_ref *pc_ref;
int ret;
- pc_ref = kmalloc_obj(*pc_ref, GFP_ATOMIC);
+ pc_ref = kmalloc_obj(*pc_ref, GFP_KERNEL);
if (!pc_ref)
return -ENOMEM;
reply other threads:[~2026-12-02 14:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026120231-footprint-eligible-a023@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=hare@kernel.org \
--cc=hch@lst.de \
--cc=kanie@linux.alibaba.com \
--cc=kbusch@kernel.org \
--cc=nilay@linux.ibm.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.