summaryrefslogtreecommitdiff
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorGeliang Tang <tanggeliang@kylinos.cn>2024-04-23 13:35:27 +0300
committerMartin KaFai Lau <martin.lau@kernel.org>2024-04-24 23:12:28 +0300
commit151f7442436658ee84076681d8f52e987fe147ea (patch)
tree207cd2dec61f6841b4257c91909de2b07d628490 /mm/hugetlb.c
parent55d30cc90fd42587594345a025b34399585e6e19 (diff)
downloadlinux-151f7442436658ee84076681d8f52e987fe147ea.tar.xz
selftests/bpf: Fix a fd leak in error paths in open_netns
As Martin mentioned in review comment, there is an existing bug that orig_netns_fd will be leaked in the later "goto fail;" case after open("/proc/self/ns/net") in open_netns() in network_helpers.c. This patch adds "close(token->orig_netns_fd);" before "free(token);" to fix it. Fixes: a30338840fa5 ("selftests/bpf: Move open_netns() and close_netns() into network_helpers.c") Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Link: https://lore.kernel.org/r/a104040b47c3c34c67f3f125cdfdde244a870d3c.1713868264.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'mm/hugetlb.c')
0 files changed, 0 insertions, 0 deletions