Re: memory leak in posix_clock_open

From: Red Hat Product Security
Date: Thu Mar 14 2024 - 22:15:23 EST


Hello!

INC2889741 (memory leak in posix_clock_open) has been updated.

Opened for: liujingfeng@xxxxxxxxxxx
Followers: richardcochran@xxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, syzkaller@xxxxxxxxxxxxxxxx

A Guest updated your request with the following comments:

Reply from: qiang.zhang1211@xxxxxxxxx
 
>
> 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

How can I track and update my request?

To respond, reply to this email. You may also create a new email and include the request number (INC2889741) in the subject.

Thank you,
Product Security

 
Ref:MSG86727590