diff options
author | Maninder Singh <maninder1.s@samsung.com> | 2025-03-06 14:50:06 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-27 11:11:15 +0100 |
commit | 3f3eb3c3420d40f7e1001a9fa561b37f0afb2e1a (patch) | |
tree | 8fcfd4d2a5d246c97385fe1455aab2ed1c0eabf2 | |
parent | 763d1789c03f88c9389bc6601398223dcda06cc7 (diff) |
NFSD: unregister filesystem in case genl_register_family() fails
commit ff12eb379554eea7932ad6caea55e3091701cce4 upstream.
With rpc_status netlink support, unregister of register_filesystem()
was missed in case of genl_register_family() fails.
Correcting it by making new label.
Fixes: bd9d6a3efa97 ("NFSD: add rpc_status netlink support")
Cc: stable@vger.kernel.org
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/nfsd/nfsctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 2e835e7c107e..dcd59a4ff986 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -2345,7 +2345,7 @@ static int __init init_nfsd(void) goto out_free_cld; retval = register_filesystem(&nfsd_fs_type); if (retval) - goto out_free_all; + goto out_free_nfsd4; retval = genl_register_family(&nfsd_nl_family); if (retval) goto out_free_all; @@ -2353,6 +2353,8 @@ static int __init init_nfsd(void) return 0; out_free_all: + unregister_filesystem(&nfsd_fs_type); +out_free_nfsd4: nfsd4_destroy_laundry_wq(); out_free_cld: unregister_cld_notifier(); |