]> asedeno.scripts.mit.edu Git - linux.git/commit
selinux: Use kmem_cache for hashtab_node
authorKyeongdon Kim <kyeongdon.kim@lge.com>
Wed, 6 Sep 2017 09:50:19 +0000 (18:50 +0900)
committerPaul Moore <paul@paul-moore.com>
Wed, 20 Sep 2017 16:01:58 +0000 (12:01 -0400)
commit7c620ece125cbab7b5dfcb574ee1e64ab8b562cd
tree53535c964faebf8e3ced3151353c8577213a59cc
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e
selinux: Use kmem_cache for hashtab_node

During random test as own device to check slub account,
we found some slack memory from hashtab_node(kmalloc-64).
By using kzalloc(), middle of test result like below:
allocated size 240768
request size 45144
slack size 195624
allocation count 3762

So, we want to use kmem_cache_zalloc() and that
can reduce memory size 52byte(slack size/alloc count) per each struct.

Signed-off-by: Kyeongdon Kim <kyeongdon.kim@lge.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/hashtab.c
security/selinux/ss/hashtab.h
security/selinux/ss/services.c