Commit ab20b0bd authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

overflow: Introduce __DEFINE_FLEX for having no initializer

commit 5c78e793 upstream.

While not yet in the tree, there is a proposed patch[1] that was
depending on the prior behavior of _DEFINE_FLEX, which did not have an
explicit initializer. Provide this via __DEFINE_FLEX now, which can also
have attributes applied (e.g. __uninitialized).

Examples of the resulting initializer behaviors can be seen here:
https://godbolt.org/z/P7Go8Tr33

Link: https://lore.kernel.org/netdev/20250520205920.2134829-9-anthony.l.nguyen@intel.com

 [1]
Fixes: 47e36ed7 ("overflow: Fix direct struct member initialization in _DEFINE_FLEX()")
Signed-off-by: default avatarKees Cook <kees@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5ed1d7a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment