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:20:41 +0000 (11:20 -0400)
commitb977f96d0a414e76d4c544f65791919dde1bc57e
tree8b75ca155ded5924bf889422c3a87c198ce8f682
parentfbae1b8ca50e459d5568c2542d448093be5c407f
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.039703 seconds and 4 git commands to generate.