linux-stable/include
Eric Biggers 3a47d1e8ef nfs: add missing selections of CONFIG_CRC32
[ Upstream commit cd35b6cb46 ]

nfs.ko, nfsd.ko, and lockd.ko all use crc32_le(), which is available
only when CONFIG_CRC32 is enabled.  But the only NFS kconfig option that
selected CONFIG_CRC32 was CONFIG_NFS_DEBUG, which is client-specific and
did not actually guard the use of crc32_le() even on the client.

The code worked around this bug by only actually calling crc32_le() when
CONFIG_CRC32 is built-in, instead hard-coding '0' in other cases.  This
avoided randconfig build errors, and in real kernels the fallback code
was unlikely to be reached since CONFIG_CRC32 is 'default y'.  But, this
really needs to just be done properly, especially now that I'm planning
to update CONFIG_CRC32 to not be 'default y'.

Therefore, make CONFIG_NFS_FS, CONFIG_NFSD, and CONFIG_LOCKD select
CONFIG_CRC32.  Then remove the fallback code that becomes unnecessary,
as well as the selection of CONFIG_CRC32 from CONFIG_NFS_DEBUG.

Fixes: 1264a2f053 ("NFS: refactor code for calculating the crc32 hash of a filehandle")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-04-25 10:43:52 +02:00
..
acpi
asm-generic vmlinux.lds: Ensure that const vars with relocations are mapped R/O 2025-03-07 16:56:50 +01:00
clocksource
crypto
drm drm/dp_mst: Fix drm RAD print 2025-04-10 14:33:32 +02:00
dt-bindings
keys
kunit
kvm
linux nfs: add missing selections of CONFIG_CRC32 2025-04-25 10:43:52 +02:00
math-emu
media
memory
misc
net sctp: detect and prevent references to a freed transport in sendmsg 2025-04-25 10:43:43 +02:00
pcmcia
ras
rdma RDMA/core: Don't expose hw_counters outside of init net namespace 2025-04-10 14:33:34 +02:00
rv
scsi
soc
sound ASoC: ops: Consistently treat platform_max as control value 2025-03-28 21:58:57 +01:00
target
trace
uapi drm/amdkfd: clamp queue size to minimum 2025-04-25 10:43:33 +02:00
ufs
vdso
video
xen xen/mcelog: Add __nonstring annotations for unterminated strings 2025-04-25 10:43:27 +02:00