Thread (8 messages) 8 messages, 8 authors, 2015-11-19

Re: [PATCH] tree wide: Use kvfree() than conditional kfree()/vfree()

From: David Rientjes <rientjes@google.com>
Date: 2015-11-19 00:23:37
Also in: dri-devel, linux-acpi, linux-fsdevel, linux-mm, lkml

On Mon, 9 Nov 2015, Tetsuo Handa wrote:
There are many locations that do

  if (memory_was_allocated_by_vmalloc)
    vfree(ptr);
  else
    kfree(ptr);

but kvfree() can handle both kmalloc()ed memory and vmalloc()ed memory
using is_vmalloc_addr(). Unless callers have special reasons, we can
replace this branch with kvfree(). Please check and reply if you found
problems.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Russell King <redacted> # arm
Cc: <redacted> # apei
Cc: <redacted> # drbd
Cc: <redacted> # mspec
Cc: <redacted> # drm
Cc: Oleg Drokin <redacted> # lustre
Cc: Andreas Dilger <redacted> # lustre
Cc: <redacted> # coda
Cc: <redacted> # jffs2
Cc: Jan Kara <jack@suse.com> # udf
Cc: <redacted> # xattr
Cc: <redacted> # ipc + mm
Cc: <redacted> # ipv4
Acked-by: David Rientjes <rientjes@google.com>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help