fix: mm/slab_common: drop kmem_alloc & avoid dereferencing fields when not using...
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 17 Oct 2022 17:49:51 +0000 (13:49 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 24 Oct 2022 15:18:23 +0000 (11:18 -0400)
commitabbffdb8dfba2a3b8ba7f5b738b6c55debcf1a13
treeaa93b4b68c4ec5b27d15c592db32e7d1eab52eea
parent60ae08f0b92f06f7e092b5c5e5dc2a65a9e507a0
fix: mm/slab_common: drop kmem_alloc & avoid dereferencing fields when not using (v6.1)

See uptream commit:

  commit 2c1d697fb8ba6d2d44f914d4268ae1ccdf025f1b
  Author: Hyeonggon Yoo <42.hyeyoo@gmail.com>
  Date:   Wed Aug 17 19:18:24 2022 +0900

    mm/slab_common: drop kmem_alloc & avoid dereferencing fields when not using

    Drop kmem_alloc event class, and define kmalloc and kmem_cache_alloc
    using TRACE_EVENT() macro.

    And then this patch does:
       - Do not pass pointer to struct kmem_cache to trace_kmalloc.
         gfp flag is enough to know if it's accounted or not.
       - Avoid dereferencing s->object_size and s->size when not using kmem_cache_alloc event.
       - Avoid dereferencing s->name in when not using kmem_cache_free event.
       - Adjust s->size to SLOB_UNITS(s->size) * SLOB_UNIT in SLOB

Change-Id: Icd7925731ed4a737699c3746cb7bb7760a4e8009
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/instrumentation/events/kmem.h
This page took 0.025521 seconds and 4 git commands to generate.