]> git.ipfire.org Git - thirdparty/linux.git/commit
keys: use kmalloc_flex in user_preparse
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 4 May 2026 09:31:00 +0000 (11:31 +0200)
committerJarkko Sakkinen <jarkko@kernel.org>
Mon, 15 Jun 2026 12:19:12 +0000 (15:19 +0300)
commit8f2e22cfc45903b28bb9c5829a9ddbccc5001ea3
tree570363067ad851b6dd6f3f6699c7a5b0565a6168
parent4d05e948cebe03974ab9927daee55273207fdc22
keys: use kmalloc_flex in user_preparse

Use kmalloc_flex() when allocating a new struct user_key_payload in
user_preparse() to replace the open-coded size arithmetic and to keep
the size type-safe.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://lore.kernel.org/r/20260504093058.49720-3-thorsten.blum@linux.dev
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
security/keys/user_defined.c