]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ecryptfs: Use struct_size to improve process_response + send_miscdev
authorThorsten Blum <thorsten.blum@linux.dev>
Thu, 5 Feb 2026 13:24:51 +0000 (14:24 +0100)
committerTyler Hicks <code@tyhicks.com>
Thu, 26 Mar 2026 03:39:27 +0000 (22:39 -0500)
commit8b9bf58bc3a6f148d990bb697a3b6dbb11672f86
tree4b3f31cba6326d6aabac9aae6e10340ea810c18c
parentf7a1c0283f135833db164cc0fac8d422fed2079e
ecryptfs: Use struct_size to improve process_response + send_miscdev

Use struct_size(), which provides additional compile-time checks for
structures with flexible array members (e.g., __must_be_array()), to
determine the allocation size for a new 'struct ecryptfs_message'.

In send_miscdev(), reuse 'msg_size' instead of recalculating it.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Tyler Hicks <code@tyhicks.com>
fs/ecryptfs/messaging.c
fs/ecryptfs/miscdev.c