diff options
author | Xiyu Yang <xiyuyang19@fudan.edu.cn> | 2021-09-09 12:32:38 +0800 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2022-01-13 09:36:58 -0500 |
commit | 776d794f28c95051bc70405a7b1fa40115658a18 (patch) | |
tree | 4b86ad2c5219d924796eb7c5727874f112f8f806 /tools/perf/scripts/python/event_analyzing_sample.py | |
parent | 4ca9f31a2be66d5fbf34b5b91ef17de7480992e1 (diff) |
net/sunrpc: fix reference count leaks in rpc_sysfs_xprt_state_change
The refcount leak issues take place in an error handling path. When the
3rd argument buf doesn't match with "offline", "online" or "remove", the
function simply returns -EINVAL and forgets to decrease the reference
count of a rpc_xprt object and a rpc_xprt_switch object increased by
rpc_sysfs_xprt_kobj_get_xprt() and
rpc_sysfs_xprt_kobj_get_xprt_switch(), causing reference count leaks of
both unused objects.
Fix this issue by jumping to the error handling path labelled with
out_put when buf matches none of "offline", "online" or "remove".
Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Signed-off-by: Xin Xiong <xiongx18@fudan.edu.cn>
Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions