summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorChuck Lever <cel@kernel.org>2026-09-16 16:43:36 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2026-09-24 15:29:05 -0400
commit72233aabc78cd0415c850641bc2a6e4fea23173f (patch)
treef7bf2547ab3b102f4ccaea642b34df0f7115db31 /scripts/Makefile.thinlto
parenta0db57fee35ece5603f852df1b665e01e0556f65 (diff)
downloadlinux-72233aabc78cd0415c850641bc2a6e4fea23173f.tar.gz
linux-72233aabc78cd0415c850641bc2a6e4fea23173f.zip
NFS: use TCP for MOUNT when xprtsec= selects TLS
An NFSv2 or NFSv3 text mount that specifies xprtsec= but no mountproto= crashes in nfs_init_timeout_values(): RIP: 0010:nfs_init_timeout_values+0x10a/0x110 [nfs] Call Trace: nfs_mount+0x1c3/0x330 [nfs] nfs_try_get_tree+0x1e5/0x460 [nfs] nfs_get_tree+0x64d/0x6d0 [nfs] vfs_get_tree+0x2b/0xe0 vfs_cmd_create+0x5f/0xd0 vfs_fsconfig_locked+0x50/0x130 __se_sys_fsconfig+0x2f9/0x3a0 nfs_validate_transport_protocol() sets nfs_server.protocol to XPRT_TRANSPORT_TCP_TLS when xprtsec= is present, but the switch in nfs_set_mount_transport_protocol() has no case for that value. mount_server.protocol stays zero, and nfs_init_timeout_values() calls BUG() on a transport it does not recognize. mount.nfs always appends mountproto= after probing the server's rpcbind, so only a caller that bypasses it, such as "mount -i" or a program that drives fsconfig() directly, reaches the crash. Select TCP for MOUNT when the NFS transport is XPRT_TRANSPORT_TCP_TLS. nfs_mount() requests no transport security, so MOUNT already runs over plain TCP whenever mount.nfs supplies mountproto=tcp. Fixes: c8407f2e560c ("NFS: Add an "xprtsec=" NFS mount option") Signed-off-by: Chuck Lever <cel@kernel.org> Reviewed-by: Prabhakar Pujeri <prabhakar.pujeri@dell.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions