* kernel compile error in: fs/nfsd/nfs4state.c (linux-5.15.209.tar.xz)
@ 2026-12-03 16:42 daffyduck via Bugspray Bot
2026-12-03 16:42 ` daffyduck via Bugspray Bot
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: daffyduck via Bugspray Bot @ 2026-12-03 16:42 UTC (permalink / raw)
To: linux-nfs, anna, cel, jlayton, trondmy
daffyduck added an attachment on Kernel.org Bugzilla:
Created attachment 310288
".config" file for Linux "make"
Note: appears to be the same issue as in another kernel series, 2025:
https://bugzilla.kernel.org/show_bug.cgi?id=220745
- "linux-5.15.209.tar.xz" fails to compile (compile error)
- ".config" file attached; it is an Ubuntu config with debian keys removed:
commented out orig: CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem"
commented out orig: CONFIG_SYSTEM_REVOCATION_KEYS="debian/canonical-revoked-certs.pem"
How to reproduce:
############### (make of linux-5.15.209.tar.xz) x86_64
>gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
>make clean
>make mrproper
### copy in the attached .config
>make
warning:
CC [M] drivers/hid/hid-picolcd_cir.o
drivers/vhost/scsi.c: In function ‘vhost_scsi_flush’:
drivers/vhost/scsi.c:1450:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1450 | }
| ^
In file included from <command-line>:
In function ‘nfsd4_get_drc_mem’,
inlined from ‘check_forechannel_attrs’ at fs/nfsd/nfs4state.c:3542:16,
inlined from ‘nfsd4_create_session’ at fs/nfsd/nfs4state.c:3615:11:
././include/linux/compiler_types.h:333:38: error: call to ‘__compiletime_assert_940’ declared with attribute error: clamp() low limit slotsize greater than high limit total_avail/scale_factor
333 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
././include/linux/compiler_types.h:314:4: note: in definition of macro ‘__compiletime_assert’
314 | prefix ## suffix(); \
| ^~~~~~
././include/linux/compiler_types.h:333:2: note: in expansion of macro ‘_compiletime_assert’
333 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
./include/linux/minmax.h:188:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
188 | BUILD_BUG_ON_MSG(statically_true(ulo > uhi), \
| ^~~~~~~~~~~~~~~~
./include/linux/minmax.h:195:2: note: in expansion of macro ‘__clamp_once’
195 | __clamp_once(type, val, lo, hi, __UNIQUE_ID(v_), __UNIQUE_ID(l_), __UNIQUE_ID(h_))
| ^~~~~~~~~~~~
./include/linux/minmax.h:218:36: note: in expansion of macro ‘__careful_clamp’
218 | #define clamp_t(type, val, lo, hi) __careful_clamp(type, val, lo, hi)
| ^~~~~~~~~~~~~~~
fs/nfsd/nfs4state.c:1826:10: note: in expansion of macro ‘clamp_t’
1826 | avail = clamp_t(unsigned long, avail, slotsize,
| ^~~~~~~
make[2]: *** [scripts/Makefile.build:289: fs/nfsd/nfs4state.o] Error 1
make[1]: *** [scripts/Makefile.build:552: fs/nfsd] Error 2
make: *** [Makefile:1924: fs] Error 2
File: .config-removed-Debian-keys (text/plain)
Size: 254.13 KiB
Link: https://bugzilla.kernel.org/attachment.cgi?id=310288
---
".config" file for Linux "make"
You can reply to this message to join the discussion.
--
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: kernel compile error in: fs/nfsd/nfs4state.c (linux-5.15.209.tar.xz)
2026-12-03 16:42 kernel compile error in: fs/nfsd/nfs4state.c (linux-5.15.209.tar.xz) daffyduck via Bugspray Bot
@ 2026-12-03 16:42 ` daffyduck via Bugspray Bot
2026-12-03 16:42 ` daffyduck via Bugspray Bot
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: daffyduck via Bugspray Bot @ 2026-12-03 16:42 UTC (permalink / raw)
To: linux-nfs, anna, cel, jlayton, trondmy
daffyduck writes via Kernel.org Bugzilla:
I fixed it by, but my fix misses the point. I don't need nfs, so I don't care.
############### How I fixed it (badly):
in fs/nfsd/nfs4state.c:1826:10:
avail = clamp_t(unsigned long, avail, total_avail/scale_factor, total_avail/scale_factor);
View: https://bugzilla.kernel.org/show_bug.cgi?id=221631#c1
You can reply to this message to join the discussion.
--
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: kernel compile error in: fs/nfsd/nfs4state.c (linux-5.15.209.tar.xz)
2026-12-03 16:42 kernel compile error in: fs/nfsd/nfs4state.c (linux-5.15.209.tar.xz) daffyduck via Bugspray Bot
2026-12-03 16:42 ` daffyduck via Bugspray Bot
@ 2026-12-03 16:42 ` daffyduck via Bugspray Bot
2026-12-03 16:42 ` daffyduck via Bugspray Bot
2026-12-03 16:42 ` Chuck Lever via Bugspray Bot
3 siblings, 0 replies; 6+ messages in thread
From: daffyduck via Bugspray Bot @ 2026-12-03 16:42 UTC (permalink / raw)
To: linux-nfs, anna, cel, jlayton, trondmy
daffyduck writes via Kernel.org Bugzilla:
The kernel "works" with that ridiculous patch of mine, but I didn't test nfs.
I'm now doing another kernel build (same kernel version, same gcc version), but this time I applied the patch as mentioned at the end of this post:
https://lkml.org/lkml/2025/11/10/12
So I'll report how it went... but still I won't test nfs, I'll only compile and boot the kernel with the patch.
Here I copy-paste the patch from that post:
---
fs/nfsd/nfs4state.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 08bfc2b29b65..d485a140d36d 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1822,8 +1822,9 @@ static u32 nfsd4_get_drc_mem(struct nfsd4_channel_attrs *ca, struct nfsd_net *nn
*/
scale_factor = max_t(unsigned int, 8, nn->nfsd_serv->sv_nrthreads);
- avail = clamp_t(unsigned long, avail, slotsize,
- total_avail/scale_factor);
+ avail = __clamp((unsigned long)avail,
+ (unsigned long)slotsize,
+ (unsigned long)(total_avail/scale_factor));
num = min_t(int, num, avail / slotsize);
num = max_t(int, num, 1);
nfsd_drc_mem_used += num * slotsize;
--
View: https://bugzilla.kernel.org/show_bug.cgi?id=221631#c2
You can reply to this message to join the discussion.
--
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: kernel compile error in: fs/nfsd/nfs4state.c (linux-5.15.209.tar.xz)
2026-12-03 16:42 kernel compile error in: fs/nfsd/nfs4state.c (linux-5.15.209.tar.xz) daffyduck via Bugspray Bot
2026-12-03 16:42 ` daffyduck via Bugspray Bot
2026-12-03 16:42 ` daffyduck via Bugspray Bot
@ 2026-12-03 16:42 ` daffyduck via Bugspray Bot
2026-12-03 16:42 ` Chuck Lever via Bugspray Bot
3 siblings, 0 replies; 6+ messages in thread
From: daffyduck via Bugspray Bot @ 2026-12-03 16:42 UTC (permalink / raw)
To: linux-nfs, anna, cel, jlayton, trondmy
daffyduck writes via Kernel.org Bugzilla:
Confirming that, with the patch as described, kernel 5.15.209 compiles without errors, boots and works.
But, note again that I didn't test any functionality of NFS.
View: https://bugzilla.kernel.org/show_bug.cgi?id=221631#c3
You can reply to this message to join the discussion.
--
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: kernel compile error in: fs/nfsd/nfs4state.c (linux-5.15.209.tar.xz)
2026-12-03 16:42 kernel compile error in: fs/nfsd/nfs4state.c (linux-5.15.209.tar.xz) daffyduck via Bugspray Bot
` (2 preceding siblings ...)
2026-12-03 16:42 ` daffyduck via Bugspray Bot
@ 2026-12-03 16:42 ` Chuck Lever via Bugspray Bot
2026-12-03 16:42 ` daffyduck via Bugspray Bot
3 siblings, 1 reply; 6+ messages in thread
From: Chuck Lever via Bugspray Bot @ 2026-12-03 16:42 UTC (permalink / raw)
To: linux-nfs, anna, cel, jlayton, trondmy
Chuck Lever writes via Kernel.org Bugzilla:
This needs to be reported to stable@vger.kernel.org -- maybe v5.15.209 is missing an upstream patch that addresses this build failure.
View: https://bugzilla.kernel.org/show_bug.cgi?id=221631#c4
You can reply to this message to join the discussion.
--
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: kernel compile error in: fs/nfsd/nfs4state.c (linux-5.15.209.tar.xz)
2026-12-03 16:42 ` Chuck Lever via Bugspray Bot
@ 2026-12-03 16:42 ` daffyduck via Bugspray Bot
0 siblings, 0 replies; 6+ messages in thread
From: daffyduck via Bugspray Bot @ 2026-12-03 16:42 UTC (permalink / raw)
To: linux-nfs, anna, cel, jlayton, trondmy
daffyduck writes via Kernel.org Bugzilla:
(In reply to Chuck Lever from comment #4)
> This needs to be reported to stable@vger.kernel.org -- maybe v5.15.209 is
> missing an upstream patch that addresses this build failure.
OK, but I won't report it, because this bug report was just a side-task for me.
You are free to report the bug there if you want.
The problem is probably that the original bug report from 2025 says pnly kernel versions "> 6.1.156" are affected (which is likely incorrect), so noone backported the patch to older kernel versions.
View: https://bugzilla.kernel.org/show_bug.cgi?id=221631#c5
You can reply to this message to join the discussion.
--
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-12-03 16:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 16:42 kernel compile error in: fs/nfsd/nfs4state.c (linux-5.15.209.tar.xz) daffyduck via Bugspray Bot
2026-12-03 16:42 ` daffyduck via Bugspray Bot
2026-12-03 16:42 ` daffyduck via Bugspray Bot
2026-12-03 16:42 ` daffyduck via Bugspray Bot
2026-12-03 16:42 ` Chuck Lever via Bugspray Bot
2026-12-03 16:42 ` daffyduck via Bugspray Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox