diff options
author | Kees Cook <[email protected]> | 2023-01-27 14:38:54 -0800 |
---|---|---|
committer | Paolo Abeni <[email protected]> | 2023-01-31 10:36:48 +0100 |
commit | f3eceaed9edd7c0e0d9fb057613131f92973626f (patch) | |
tree | c388632cbbe744405217fe3179700e8f6b52e2cf /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | |
parent | 9b3fc325c2a7e9e17e22b008357cb0ceb810d9b2 (diff) |
net: ethernet: mtk_eth_soc: Avoid truncating allocation
There doesn't appear to be a reason to truncate the allocation used for
flow_info, so do a full allocation and remove the unused empty struct.
GCC does not like having a reference to an object that has been
partially allocated, as bounds checking may become impossible when
such an object is passed to other code. Seen with GCC 13:
../drivers/net/ethernet/mediatek/mtk_ppe.c: In function 'mtk_foe_entry_commit_subflow':
../drivers/net/ethernet/mediatek/mtk_ppe.c:623:18: warning: array subscript 'struct mtk_flow_entry[0]' is partly outside array bounds of 'unsigned char[48]' [-Warray-bounds=]
623 | flow_info->l2_data.base_flow = entry;
| ^~
Cc: Felix Fietkau <[email protected]>
Cc: John Crispin <[email protected]>
Cc: Sean Wang <[email protected]>
Cc: Mark Lee <[email protected]>
Cc: Lorenzo Bianconi <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions