VMCI: Use struct_size() in kmalloc()
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Fri, 5 Jan 2024 16:39:59 +0000 (08:39 -0800)
committerKees Cook <keescook@chromium.org>
Thu, 1 Feb 2024 18:06:42 +0000 (10:06 -0800)
commite03d4910e6e45cb49f630258e870b08f2ee34e7a
tree09c2b0d2788cae483561eb89b52b4bc62e29a4d7
parent09ce61e27db83180993e8b1a7f511af62374383c
VMCI: Use struct_size() in kmalloc()

Use struct_size() instead of open coding.

Suggested-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20240105164001.2129796-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Kees Cook <keescook@chromium.org>
drivers/misc/vmw_vmci/vmci_datagram.c