Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1272709
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] tree wide: Use kvfree() than conditional kfree()/vfree() |
| Date | 2015-11-19 01:30 +0100 |
| Message-ID | <qwlgR-20q-5@gated-at.bofh.it> (permalink) |
| References | <qsTh7-5UJ-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 <linux@arm.linux.org.uk> # arm > Cc: <linux-acpi@vger.kernel.org> # apei > Cc: <drbd-user@lists.linbit.com> # drbd > Cc: <linux-kernel@vger.kernel.org> # mspec > Cc: <dri-devel@lists.freedesktop.org> # drm > Cc: Oleg Drokin <oleg.drokin@intel.com> # lustre > Cc: Andreas Dilger <andreas.dilger@intel.com> # lustre > Cc: <codalist@coda.cs.cmu.edu> # coda > Cc: <linux-mtd@lists.infradead.org> # jffs2 > Cc: Jan Kara <jack@suse.com> # udf > Cc: <linux-fsdevel@vger.kernel.org> # xattr > Cc: <linux-mm@kvack.org> # ipc + mm > Cc: <netdev@vger.kernel.org> # ipv4 Acked-by: David Rientjes <rientjes@google.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] tree wide: Use kvfree() than conditional kfree()/vfree() David Rientjes <rientjes@google.com> - 2015-11-19 01:30 +0100
csiph-web