* [Resource Leak] Missing closing files in tools/bpf/bpf_asm.c
@ 2021-12-30 3:40 Ryan Cai
2022-01-05 23:50 ` Andrii Nakryiko
0 siblings, 1 reply; 3+ messages in thread
From: Ryan Cai @ 2021-12-30 3:40 UTC (permalink / raw)
To: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend, kpsingh
Cc: netdev, bpf, linux-kernel
Dear Kernel maintainers,
1. In tools/bpf/bpf_asm.c, the file opened at Line 40 may not closed within the function?
Location: https://github.com/torvalds/linux/blob/5bfc75d92efd494db37f5c4c173d3639d4772966/tools/bpf/bpf_asm.c#L40-L49
Should it be a bug? I can send patches for these.
Best,
Ryan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Resource Leak] Missing closing files in tools/bpf/bpf_asm.c
2021-12-30 3:40 [Resource Leak] Missing closing files in tools/bpf/bpf_asm.c Ryan Cai
@ 2022-01-05 23:50 ` Andrii Nakryiko
0 siblings, 0 replies; 3+ messages in thread
From: Andrii Nakryiko @ 2022-01-05 23:50 UTC (permalink / raw)
To: Ryan Cai
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Martin Lau,
Song Liu, Yonghong Song, john fastabend, KP Singh, Networking,
bpf, open list
On Wed, Dec 29, 2021 at 7:40 PM Ryan Cai <ycaibb@gmail.com> wrote:
>
> Dear Kernel maintainers,
> 1. In tools/bpf/bpf_asm.c, the file opened at Line 40 may not closed within the function?
> Location: https://github.com/torvalds/linux/blob/5bfc75d92efd494db37f5c4c173d3639d4772966/tools/bpf/bpf_asm.c#L40-L49
>
> Should it be a bug? I can send patches for these.
file will be closed by the kernel on exit, but it would be better to
close it explicitly, so please feel free to send a fix
>
> Best,
> Ryan
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Resource Leak] Missing closing files in tools/bpf/bpf_asm.c
@ 2021-12-30 3:50 Ryan Cai
0 siblings, 0 replies; 3+ messages in thread
From: Ryan Cai @ 2021-12-30 3:50 UTC (permalink / raw)
To: akpm, shuah; +Cc: linux-mm, linux-kselftest, linux-kernel
Dear Kernel maintainers,
1. In ksm_read_sysfs, the file opened at Line 74 may not closed when going to Line 83.
Location: https://github.com/torvalds/linux/blob/512b7931ad0561ffe14265f9ff554a3c081b476b/tools/testing/selftests/vm/ksm_tests.c#L74-L83
2. In ksm_write_sysfs, the file opened at Line 56 may not closed when going to Line 64.
Location: https://github.com/torvalds/linux/blob/512b7931ad0561ffe14265f9ff554a3c081b476b/tools/testing/selftests/vm/ksm_tests.c#L55-L65
Should they be bugs? I can send a patch for these.
Best,
Ryan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-05 23:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-30 3:40 [Resource Leak] Missing closing files in tools/bpf/bpf_asm.c Ryan Cai
2022-01-05 23:50 ` Andrii Nakryiko
2021-12-30 3:50 Ryan Cai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.