diff options
author | Andrey Ryabinin <aryabinin@virtuozzo.com> | 2016-08-02 14:02:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-02 17:31:41 -0400 |
commit | 47b5c2a0f021e90a79845d1a1353780e5edd0bce (patch) | |
tree | ec7b571ca4cc63f15846c8ebee2151a5825e1057 /mm/kasan/kasan.h | |
parent | f7376aed6c032aab820fa36806a89e16e353a0d9 (diff) |
mm/kasan: get rid of ->alloc_size in struct kasan_alloc_meta
Size of slab object already stored in cache->object_size.
Note, that kmalloc() internally rounds up size of allocation, so
object_size may be not equal to alloc_size, but, usually we don't need
to know the exact size of allocated object. In case if we need that
information, we still can figure it out from the report. The dump of
shadow memory allows to identify the end of allocated memory, and
thereby the exact allocation size.
Link: http://lkml.kernel.org/r/1470062715-14077-4-git-send-email-aryabinin@virtuozzo.com
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/kasan/kasan.h')
-rw-r--r-- | mm/kasan/kasan.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h index 31972cdba433..aa175460c8f9 100644 --- a/mm/kasan/kasan.h +++ b/mm/kasan/kasan.h @@ -75,8 +75,7 @@ struct kasan_track { struct kasan_alloc_meta { struct kasan_track track; - u32 state : 2; /* enum kasan_state */ - u32 alloc_size : 30; + u32 state; }; struct qlist_node { |