From: Thomas Gleixner <tglx@linutronix.de>
To: "Z qiang" <qiang.zhang1211@gmail.com>, 柳菁峰 <liujingfeng@qianxin.com>
Cc: "richardcochran@gmail.com" <richardcochran@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"syzkaller@googlegroups.com" <syzkaller@googlegroups.com>,
"secalert@redhat.com" <secalert@redhat.com>
Subject: Re: memory leak in posix_clock_open
Date: Thu, 14 Mar 2024 11:20:35 +0100 [thread overview]
Message-ID: <87frwtm7ws.ffs@tglx> (raw)
In-Reply-To: <CALm+0cW8HutqzcrfxysLWoOVyzh70RT3G0gaALRbnS=8Lw2f=g@mail.gmail.com>
On Mon, Mar 11 2024 at 17:46, Z qiang wrote:
>
> diff --git a/kernel/time/posix-clock.c b/kernel/time/posix-clock.c
> index 9de66bbbb3d1..71d9d8c394fa 100644
> --- a/kernel/time/posix-clock.c
> +++ b/kernel/time/posix-clock.c
> @@ -137,6 +137,8 @@ static int posix_clock_open(struct inode *inode,
> struct file *fp)
>
> if (!err) {
> get_device(clk->dev);
> + } else {
> + kfree(pccontext);
> }
> out:
> up_read(&clk->rwsem);
Looks about right. Can you please send a proper patch?
next prev parent reply other threads:[~2024-03-14 10:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 8:12 memory leak in posix_clock_open 柳菁峰
2024-03-11 9:46 ` Z qiang
2024-03-14 10:20 ` Thomas Gleixner [this message]
2024-03-15 2:13 ` Z qiang
-- strict thread matches above, loose matches on Subject: below --
2024-03-11 9:48 Red Hat Product Security
2024-03-15 2:15 Red Hat Product Security
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=87frwtm7ws.ffs@tglx \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=liujingfeng@qianxin.com \
--cc=netdev@vger.kernel.org \
--cc=qiang.zhang1211@gmail.com \
--cc=richardcochran@gmail.com \
--cc=secalert@redhat.com \
--cc=syzkaller@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).