]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
thunderbolt: Use kzalloc_flex() for struct tb_path allocation
authorRosen Penev <rosenp@gmail.com>
Wed, 18 Mar 2026 18:52:37 +0000 (11:52 -0700)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 23 Mar 2026 05:49:43 +0000 (06:49 +0100)
commitc3e7cc8bc5ca08b2fae3d43c7c86f140daa873ef
tree40815c135fc5416870d0dffb5349ffe68f935448
parent500e54d449f60e9692e2622ad2ba4f1e79590e87
thunderbolt: Use kzalloc_flex() for struct tb_path allocation

Simplifies allocation of struct tb_path by using a flexible array
member. Also added __counted_by for extra runtime analysis.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/path.c
drivers/thunderbolt/tb.h