FAILED: patch "[PATCH] scsi: fnic: Use GFP_ATOMIC for VLAN alloc under spinlock" failed to apply to 6.18-stable tree
Subsystems (3)
[email protected]
maintainerThe 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 <[email protected]>.
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 9639c6324524ea3f934908bd51f02430000954ab
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026090300-shirt-frown-80ad@gregkh' --subject-prefix 'PATCH 6.18.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 9639c6324524ea3f934908bd51f02430000954ab Mon Sep 17 00:00:00 2001
From: Linkai Gong <[email protected]>
Date: Fri, 31 Jul 2026 15:38:20 +0800
Subject: [PATCH] scsi: fnic: Use GFP_ATOMIC for VLAN alloc under spinlock
fnic_fcoe_process_vlan_resp() allocates a VLAN descriptor with kzalloc_obj() (default GFP_KERNEL) while holding vlans_lock via spin_lock_irqsave(). GFP_KERNEL may sleep, which is not allowed in this atomic context and can trigger a sleeping-from-invalid-context warning or deadlock.
Pass GFP_ATOMIC so the allocation is safe under the IRQ-safe spinlock.
drivers/scsi/fnic/fip.c +1 -1
@@ -137,7 +137,7 @@ void fnic_fcoe_process_vlan_resp(struct fnic *fnic, struct fip_header *fiph) vid =be16_to_cpu (vlan_desc->fd_vlan);FNIC_FIP_DBG (KERN_INFO , fnic,"process_vlan_resp: FIP VLAN %d\n" , vid); - vlan =kzalloc_obj (*vlan); + vlan =kzalloc_obj (*vlan,GFP_ATOMIC );if (!vlan) {/* retry from timer */
Sasha Levin
maintainerPATCH 1/1 scsi: fnic: Use GFP_ATOMIC for VLAN alloc under spinlock
From: Linkai Gong <[email protected]>
[ Upstream commit 9639c6324524ea3f934908bd51f02430000954ab ]
fnic_fcoe_process_vlan_resp() allocates a VLAN descriptor with kzalloc_obj() (default GFP_KERNEL) while holding vlans_lock via spin_lock_irqsave(). GFP_KERNEL may sleep, which is not allowed in this atomic context and can trigger a sleeping-from-invalid-context warning or deadlock.
Pass GFP_ATOMIC so the allocation is safe under the IRQ-safe spinlock.
--- drivers/scsi/fnic/fip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/fnic/fip.c +1 -1
@@ -139,7 +139,7 @@ void fnic_fcoe_process_vlan_resp(struct fnic *fnic, struct fip_header *fiph)FNIC_FIP_DBG (KERN_INFO , fnic->host, fnic->fnic_num,"process_vlan_resp: FIP VLAN %d\n" , vid); - vlan =kzalloc (sizeof (*vlan),GFP_KERNEL ); + vlan =kzalloc (sizeof (*vlan),GFP_ATOMIC );if (!vlan) {/* retry from timer */
Signature · 1 line
2.53.0