summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-04-29 12:07:37 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-04-29 12:07:37 -0700
commit9e4bc4bcae012c98964c3c2010debfbd9e5b229f (patch)
treef38ac6f09ea64a56866cf3b62f47269082343ff4 /fs
parent0a2e230514c5f1b09630bab94e457e930ced4cf0 (diff)
parent24457f1be29f1e7042e50a7749f5c2dde8c433c8 (diff)
downloadlinux-stable-9e4bc4bcae012c98964c3c2010debfbd9e5b229f.tar.gz
linux-stable-9e4bc4bcae012c98964c3c2010debfbd9e5b229f.tar.bz2
linux-stable-9e4bc4bcae012c98964c3c2010debfbd9e5b229f.zip
Merge tag 'nfs-for-6.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client fixes from Trond Myklebust: - Fix an Oops in xs_tcp_tls_setup_socket - Fix an Oops due to missing error handling in nfs_net_init() * tag 'nfs-for-6.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: nfs: Handle error of rpc_proc_register() in nfs_net_init(). SUNRPC: add a missing rpc_stat for TCP TLS
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/inode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index c709c296ea9a..acef52ecb1bb 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -2429,7 +2429,12 @@ static int nfs_net_init(struct net *net)
struct nfs_net *nn = net_generic(net, nfs_net_id);
nfs_clients_init(net);
- rpc_proc_register(net, &nn->rpcstats);
+
+ if (!rpc_proc_register(net, &nn->rpcstats)) {
+ nfs_clients_exit(net);
+ return -ENOMEM;
+ }
+
return nfs_fs_proc_net_init(net);
}