selinux: Use struct_size() helper in kmalloc()
authorXiu Jianfeng <xiujianfeng@huawei.com>
Thu, 2 Dec 2021 07:35:33 +0000 (15:35 +0800)
committerPaul Moore <paul@paul-moore.com>
Mon, 6 Dec 2021 02:58:32 +0000 (21:58 -0500)
commit5fe375728983b3fca6b958434a2e3f547bbbb2aa
treec42049f41c07ecb134db22c7640d8bc4853c54c9
parent6326948f940dc3f77066d5cdc44ba6afe67830c0
selinux: Use struct_size() helper in kmalloc()

Make use of struct_size() helper instead of an open-coded calculation.

Link: https://github.com/KSPP/linux/issues/160
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/sidtab.c
security/selinux/xfrm.c