diff options
author | Patrick Ho <[email protected]> | 2021-08-21 02:56:26 -0400 |
---|---|---|
committer | Chuck Lever <[email protected]> | 2021-09-30 10:58:52 -0400 |
commit | 1d625050c7c2dd877e108e382b8aaf1ae3cfe1f4 (patch) | |
tree | fb7ee0160c5035a2ea424b9e27bb1529f9191311 /scripts/gdb | |
parent | 02579b2ff8b0becfb51d85a975908ac4ab15fba8 (diff) |
nfsd: fix error handling of register_pernet_subsys() in init_nfsd()
init_nfsd() should not unregister pernet subsys if the register fails
but should instead unwind from the last successful operation which is
register_filesystem().
Unregistering a failed register_pernet_subsys() call can result in
a kernel GPF as revealed by programmatically injecting an error in
register_pernet_subsys().
Verified the fix handled failure gracefully with no lingering nfsd
entry in /proc/filesystems. This change was introduced by the commit
bd5ae9288d64 ("nfsd: register pernet ops last, unregister first"),
the original error handling logic was correct.
Fixes: bd5ae9288d64 ("nfsd: register pernet ops last, unregister first")
Cc: [email protected]
Signed-off-by: Patrick Ho <[email protected]>
Acked-by: J. Bruce Fields <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
Diffstat (limited to 'scripts/gdb')
0 files changed, 0 insertions, 0 deletions