[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87frwtm7ws.ffs@tglx>
Date: Thu, 14 Mar 2024 11:20:35 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Z qiang <qiang.zhang1211@...il.com>, 柳菁峰
<liujingfeng@...nxin.com>
Cc: "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?
Powered by blists - more mailing lists