[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALm+0cVFRp=jZduv2DVhirvLQQrd+MLts0NsC8GJzkSnAsYrog@mail.gmail.com>
Date: Fri, 15 Mar 2024 10:13:15 +0800
From: Z qiang <qiang.zhang1211@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: 柳菁峰 <liujingfeng@...nxin.com>,
"richardcochran@...il.com" <richardcochran@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"syzkaller@...glegroups.com" <syzkaller@...glegroups.com>, "secalert@...hat.com" <secalert@...hat.com>
Subject: Re: memory leak in posix_clock_open
>
> 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?
I will send a patch.
Thanks,
Zqiang
Powered by blists - more mailing lists