All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Cai <ycaibb@gmail.com>
To: <ast@kernel.org>, <daniel@iogearbox.net>, <andrii@kernel.org>,
	<kafai@fb.com>, <songliubraving@fb.com>, <yhs@fb.com>,
	<john.fastabend@gmail.com>, <kpsingh@kernel.org>
Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: [Resource Leak] Missing closing files in samples/bpf/hbm.c
Date: Thu, 30 Dec 2021 11:26:31 +0800	[thread overview]
Message-ID: <BCA4C02F-0238-4818-BDF1-2F0411CD95A6@gmail.com> (raw)

Dear Kernel maintainers,

          1. In run_bpf_prog, the file opened at Line 308 may not closed when going to Line 310.
          Location: https://github.com/torvalds/linux/blob/5bfc75d92efd494db37f5c4c173d3639d4772966/samples/bpf/hbm.c#L302-L310

         2. In read_trace_pipe2, the file opened at Line 91 may not closed in the function.
         Location: https://github.com/torvalds/linux/blob/5bfc75d92efd494db37f5c4c173d3639d4772966/samples/bpf/hbm.c#L91-L109

           Should it be a bug? I can send a patch for these.

Best,
Ryan



             reply	other threads:[~2021-12-30  3:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30  3:26 Ryan Cai [this message]
2022-01-05 23:50 ` [Resource Leak] Missing closing files in samples/bpf/hbm.c Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BCA4C02F-0238-4818-BDF1-2F0411CD95A6@gmail.com \
    --to=ycaibb@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.