diff options
| author | Jiri Olsa <[email protected]> | 2024-08-01 13:27:24 +0000 |
|---|---|---|
| committer | Peter Zijlstra <[email protected]> | 2024-08-02 09:30:31 +0000 |
| commit | db61e6a4eee5a7884b2cafeaf407895f253bbaa7 (patch) | |
| tree | d6080afdd8f0be41345198b608cc36ba78d6fad8 /tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c | |
| parent | uprobes: simplify error handling for alloc_uprobe() (diff) | |
| download | kernel-db61e6a4eee5a7884b2cafeaf407895f253bbaa7.tar.gz kernel-db61e6a4eee5a7884b2cafeaf407895f253bbaa7.zip | |
selftests/bpf: fix uprobe.path leak in bpf_testmod
testmod_unregister_uprobe() forgets to path_put(&uprobe.path).
Signed-off-by: Jiri Olsa <[email protected]>
Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c')
| -rw-r--r-- | tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c index fd28c1157bd3..72f565af4f82 100644 --- a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c +++ b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c @@ -477,6 +477,7 @@ static void testmod_unregister_uprobe(void) if (uprobe.offset) { uprobe_unregister(d_real_inode(uprobe.path.dentry), uprobe.offset, &uprobe.consumer); + path_put(&uprobe.path); uprobe.offset = 0; } |
