From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 0D1981FF13B for ; Wed, 20 May 2026 10:37:07 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 351151CEF7; Wed, 20 May 2026 10:37:04 +0200 (CEST) From: Christian Ebner 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 Message-ID: <20260520083612.781892-1-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1779266172961 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.069 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: LCVUXGJEF74NSI2PJRDGA2JBSEFU577F X-Message-ID-Hash: LCVUXGJEF74NSI2PJRDGA2JBSEFU577F X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- ...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 +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 +Signed-off-by: Rob Norris +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