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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
> Acked-by: Michal Hocko <mhocko@xxxxxxxx>
> Cc: Russell King <linux@xxxxxxxxxxxxxxxx> # arm
> Cc: <linux-acpi@xxxxxxxxxxxxxxx> # apei
> Cc: <drbd-user@xxxxxxxxxxxxxxxx> # drbd
> Cc: <linux-kernel@xxxxxxxxxxxxxxx> # mspec
> Cc: <dri-devel@xxxxxxxxxxxxxxxxxxxxx> # drm
> Cc: Oleg Drokin <oleg.drokin@xxxxxxxxx> # lustre
> Cc: Andreas Dilger <andreas.dilger@xxxxxxxxx> # lustre
> Cc: <codalist@xxxxxxxxxxxxxxx> # coda
> Cc: <linux-mtd@xxxxxxxxxxxxxxxxxxx> # jffs2
> Cc: Jan Kara <jack@xxxxxxxx> # udf
> Cc: <linux-fsdevel@xxxxxxxxxxxxxxx> # xattr
> Cc: <linux-mm@xxxxxxxxx> # ipc + mm
> Cc: <netdev@xxxxxxxxxxxxxxx> # ipv4

Acked-by: David Rientjes <rientjes@xxxxxxxxxx>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux