Re: [PATCH] mm/vmalloc.c: check the addr first

2020-10-08 Thread Hui Su
On Mon, Sep 28, 2020 at 11:04:34AM -0700, Ira Weiny wrote: > On Mon, Sep 28, 2020 at 12:33:37AM +0800, Hui Su wrote: > > As the comments said, if @addr is NULL, no operation > > is performed, check the addr first in vfree() and > > vfree_atomic() maybe a better choice. > > I don't see how this cha

Re: [PATCH] mm/vmalloc.c: check the addr first

2020-09-28 Thread Ira Weiny
On Mon, Sep 28, 2020 at 12:33:37AM +0800, Hui Su wrote: > As the comments said, if @addr is NULL, no operation > is performed, check the addr first in vfree() and > vfree_atomic() maybe a better choice. I don't see how this change helps anything. kmemleak_free() checks addr so no danger there. A

[PATCH] mm/vmalloc.c: check the addr first

2020-09-27 Thread Hui Su
As the comments said, if @addr is NULL, no operation is performed, check the addr first in vfree() and vfree_atomic() maybe a better choice. Signed-off-by: Hui Su --- mm/vmalloc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index be