diff options
author | Kees Cook <kees@kernel.org> | 2024-06-10 11:23:05 -0700 |
---|---|---|
committer | Kees Cook <kees@kernel.org> | 2024-06-10 12:00:04 -0700 |
commit | 9dd5134c61580ba4c219296c37e08ff64c109a74 (patch) | |
tree | 36d6b9a4f206b3f6f6f2db48d2b5f508fecb5897 /drivers/fpga/fpga-mgr.c | |
parent | f7d3b1ffc654b0435ac2c9c02a72fb2752bdb0fd (diff) |
kunit/overflow: Adjust for __counted_by with DEFINE_RAW_FLEX()
When a flexible array structure has a __counted_by annotation, its use
with DEFINE_RAW_FLEX() will result in the count being zero-initialized.
This is expected since one doesn't want to use RAW with a counted_by
struct. Adjust the tests to check for the condition and for compiler
support.
Reported-by: Christian Schrefl <chrisi.schrefl@gmail.com>
Closes: https://lore.kernel.org/all/0bfc6b38-8bc5-4971-b6fb-dc642a73fbfe@gmail.com/
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20240610182301.work.272-kees@kernel.org
Tested-by: Christian Schrefl <chrisi.schrefl@gmail.com>
Reviewed-by: Christian Schrefl <chrisi.schrefl@gmail.com>
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions