Skip to content

devres: Provide kmalloc_obj*-style API for devm_kmalloc

Kees Cook driver-core linux-hardening linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mm: Move default_gfp() into gfp_types.hinclude/linux/gfp.h include/linux/gfp_types.h+4 -43 replies
2/2devres: Provide kmalloc_obj*-style API for devm_kmallocinclude/linux/device/devres.h+102 -011 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchZi YanVlastimil Babka (SUSE)Greg Kroah-HartmanLorenzo Stoakes (ARM)Danilo Krummrich
1/2R-b R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH 0/2] devres: Provide kmalloc_obj*-style API for devm_kmalloc

Hi,

As a continuation of the type-based allocator work, this introduces the wrappers for devm_kmalloc()-family to use the _obj/_objs/_flex API that the kmalloc()-family has moved to. Along with the coming changes to scripts/coccinelle/api/kmalloc_objs.cocci to support devm_kmalloc() conversions, this will result in the following uses:

            6644    devm_kzalloc_obj()
            1714    devm_kzalloc_objs()
             296    devm_kzalloc_flex()
              89    devm_kmalloc_objs()
              83    devm_kmalloc_obj()
               2    devm_kmalloc_flex()

which totals out in diffstat to:

 5908 files changed, 10013 insertions(+), 12082 deletions(-)

-Kees

Kees Cook (2):
mm: Move default_gfp() into gfp_types.h
devres: Provide kmalloc_obj*-style API for devm_kmalloc

 include/linux/device/devres.h | 102 ++++++++++++++++++++++++++++++++++
 include/linux/gfp.h           |   4 --
 include/linux/gfp_types.h     |   4 ++
 3 files changed, 106 insertions(+), 4 deletions(-)
Signature · 1 line
2.34.1