[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e755af9f0e104fb8b374d2a2c2bb854b@AcuMS.aculab.com>
Date: Fri, 21 May 2021 12:15:12 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Austin Kim' <austindh.kim@...il.com>,
Greg KH <gregkh@...uxfoundation.org>
CC: "tj@...nel.org" <tj@...nel.org>, "neilb@...e.de" <neilb@...e.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
김동현 <austin.kim@....com>
Subject: RE: [PATCH] kernfs: move return value check after kmalloc()
From: Austin Kim
> Sent: 21 May 2021 07:55
>
> 2021년 5월 21일 (금) 오후 1:39, Greg KH <gregkh@...uxfoundation.org>님이 작성:
> >
> > On Fri, May 21, 2021 at 03:55:25AM +0100, Austin Kim wrote:
> > > With 414985ae23c0 ("sysfs, kernfs: move file core code to fs/kernfs/file.c"),
> > > 'return -ENOMEM' is executed when kmalloc() returns NULL.
> > >
> > > Since 'commit 4ef67a8c95f3 ("sysfs/kernfs: make read requests on pre-alloc
> > > files use the buffer.")', 'return -ENOMEM' statement is not properly located.
> > >
> > > Fix it by moving 'return -ENOMEM' after return from kmalloc().
> > >
> > > Fixes: 4ef67a8c95f3 ("sysfs/kernfs: make read requests on pre-alloc files use the buffer.")
> > > Signed-off-by: Austin Kim <austindh.kim@...il.com>
> [...]
> >
> > Like Neil said, I don't see the "bug" you are fixing here. What is
> > currently wrong with the existing code?
...
If you look at the generated code you'll almost certainly
find no significant differences.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists