diff options
author | Jeff Layton <jlayton@kernel.org> | 2025-02-06 21:12:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-20 11:16:01 +0300 |
commit | 6a59b70fe71ec66c0dd19e2c279c71846a3fb2f0 (patch) | |
tree | 61a66148a55dcd75c0f97ffe631113eae5e4448e /tools/perf/scripts/python/stackcollapse.py | |
parent | b2b18a9f68f992f0082969ec755d7ca8af76bcb0 (diff) | |
download | linux-6a59b70fe71ec66c0dd19e2c279c71846a3fb2f0.tar.xz |
nfsd: don't ignore the return code of svc_proc_register()
commit 930b64ca0c511521f0abdd1d57ce52b2a6e3476b upstream.
Currently, nfsd_proc_stat_init() ignores the return value of
svc_proc_register(). If the procfile creation fails, then the kernel
will WARN when it tries to remove the entry later.
Fix nfsd_proc_stat_init() to return the same type of pointer as
svc_proc_register(), and fix up nfsd_net_init() to check that and fail
the nfsd_net construction if it occurs.
svc_proc_register() can fail if the dentry can't be allocated, or if an
identical dentry already exists. The second case is pretty unlikely in
the nfsd_net construction codepath, so if this happens, return -ENOMEM.
Reported-by: syzbot+e34ad04f27991521104c@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/linux-nfs/67a47501.050a0220.19061f.05f9.GAE@google.com/
Cc: stable@vger.kernel.org # v6.9
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions