diff options
author | Eric Biggers <ebiggers@google.com> | 2025-04-01 15:02:21 -0700 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2025-04-13 16:39:42 -0400 |
commit | cd35b6cb46649750b7dbd0df0e2d767415d8917b (patch) | |
tree | b460cd16b7d1a6acabff55fea378de2135f7f63a /rust/helpers/build_bug.c | |
parent | 26a80762153ba0dc98258b5e6d2e9741178c5114 (diff) | |
download | linux-cd35b6cb46649750b7dbd0df0e2d767415d8917b.tar.gz linux-cd35b6cb46649750b7dbd0df0e2d767415d8917b.tar.bz2 linux-cd35b6cb46649750b7dbd0df0e2d767415d8917b.zip |
nfs: add missing selections of CONFIG_CRC32
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: 1264a2f053a3 ("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>
Diffstat (limited to 'rust/helpers/build_bug.c')
0 files changed, 0 insertions, 0 deletions