From: Christian Ebner <c.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH zfsonlinux] debian/patches: backport vmalloc gfp flag fix
Date: Wed, 20 May 2026 10:36:12 +0200 [thread overview]
Message-ID: <20260520083612.781892-1-c.ebner@proxmox.com> (raw)
Since commit 07003531e ("mm/vmalloc: warn on invalid vmalloc gfp
flags") [0] the Linux kernel explicitley warns and clears unsupported
gfp flags to vmalloc calls. ZFS already fixed some of these, in
particular __GFP_COMP flag in commit cb1833023 ("kmem: don't add
__GFP_COMP for KM_VMEM allocations"). This was however incomplete.
Backport the upstream fix, the otherwise shown kernel trace is
potentially alarming but benign as also confirmed by upstream [1].
[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=07003531e03c864b0711757c8009c7f14c95d1d1
[1] https://github.com/openzfs/zfs/issues/18556
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
...ove-__GFP_COMP-before-calling-vmallo.patch | 38 +++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 39 insertions(+)
create mode 100644 debian/patches/0011-spl_kvmalloc-remove-__GFP_COMP-before-calling-vmallo.patch
diff --git a/debian/patches/0011-spl_kvmalloc-remove-__GFP_COMP-before-calling-vmallo.patch b/debian/patches/0011-spl_kvmalloc-remove-__GFP_COMP-before-calling-vmallo.patch
new file mode 100644
index 0000000000..ebc6704cb7
--- /dev/null
+++ b/debian/patches/0011-spl_kvmalloc-remove-__GFP_COMP-before-calling-vmallo.patch
@@ -0,0 +1,38 @@
+From e5473afe18a013ec76070e8ef10597f7cda153f2 Mon Sep 17 00:00:00 2001
+From: Rob Norris <rob.norris@truenas.com>
+Date: Wed, 20 May 2026 02:11:31 +1000
+Subject: [PATCH] spl_kvmalloc: remove __GFP_COMP before calling vmalloc()
+
+In cb1833023 we stopped using it for KM_VMEM allocations, since its not
+a valid flag for vmalloc(). However, there's a fallback path for
+non-KM_VMEM allocations to use vmalloc(), and we need to remove
+__GFP_COMP there too to avoid a warning.
+
+Sponsored-by: TrueNAS
+Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Signed-off-by: Rob Norris <rob.norris@truenas.com>
+Closes #18558
+---
+ module/os/linux/spl/spl-kmem.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/module/os/linux/spl/spl-kmem.c b/module/os/linux/spl/spl-kmem.c
+index 9fe4042b50..6e34026198 100644
+--- a/module/os/linux/spl/spl-kmem.c
++++ b/module/os/linux/spl/spl-kmem.c
+@@ -188,6 +188,12 @@ spl_kvmalloc(size_t size, gfp_t lflags)
+ return (ptr);
+ }
+
++ /*
++ * vmalloc fallback. KM_VMEM may not have been requested originally if
++ * we've come through spl_kmem_alloc_impl(), so we need to remove
++ * __GFP_COMP, which is not a valid flag for vmalloc.
++ */
++ lflags &= ~__GFP_COMP;
+ return (spl_vmalloc(size, lflags));
+ }
+
+--
+2.47.3
+
diff --git a/debian/patches/series b/debian/patches/series
index 0ef82e7bbd..b73cc42841 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@
0008-zpool-status-tighten-bounds-for-noalloc-stat-availab.patch
0009-libzfs-scrub-only-include-start-and-end-nv-pairs-if-.patch
0010-Add-no-preserve-encryption-flag.patch
+0011-spl_kvmalloc-remove-__GFP_COMP-before-calling-vmallo.patch
--
2.47.3
next reply other threads:[~2026-05-20 8:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 8:36 Christian Ebner [this message]
2026-05-20 8:46 ` applied: [PATCH zfsonlinux] debian/patches: backport vmalloc gfp flag fix Fabian Grünbichler
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=20260520083612.781892-1-c.ebner@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/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.