aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/igc/igc_ptp.c
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2023-06-20 12:42:38 -0700
committerPaolo Abeni <[email protected]>2023-06-22 11:27:47 +0200
commitdec24b3b339487e58ce2da2875e9ee0316cc7e70 (patch)
tree0bdbdcd85ea7f552dcc2c67707690fb38deb68bd /drivers/net/ethernet/intel/igc/igc_ptp.c
parent2174a08db80d1efeea382e25ac41c4e7511eb6d6 (diff)
net: wwan: iosm: Convert single instance struct member to flexible array
struct mux_adth actually ends with multiple struct mux_adth_dg members. This is seen both in the comments about the member: /** * struct mux_adth - Structure of the Aggregated Datagram Table Header. ... * @dg: datagramm table with variable length */ and in the preparation for populating it: adth_dg_size = offsetof(struct mux_adth, dg) + ul_adb->dg_count[i] * sizeof(*dg); ... adth_dg_size -= offsetof(struct mux_adth, dg); memcpy(&adth->dg, ul_adb->dg[i], adth_dg_size); This was reported as a run-time false positive warning: memcpy: detected field-spanning write (size 16) of single field "&adth->dg" at drivers/net/wwan/iosm/iosm_ipc_mux_codec.c:852 (size 8) Adjust the struct mux_adth definition and associated sizeof() math; no binary output differences are observed in the resulting object file. Reported-by: Florian Klink <[email protected]> Closes: https://lore.kernel.org/lkml/[email protected]/ Fixes: 1f52d7b62285 ("net: wwan: iosm: Enable M.2 7360 WWAN card support") Cc: M Chetan Kumar <[email protected]> Cc: Bagas Sanjaya <[email protected]> Cc: Intel Corporation <[email protected]> Cc: Loic Poulain <[email protected]> Cc: Sergey Ryazanov <[email protected]> Cc: Johannes Berg <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: Paolo Abeni <[email protected]> Cc: "Gustavo A. R. Silva" <[email protected]> Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Reviewed-by: Gustavo A. R. Silva <[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 'drivers/net/ethernet/intel/igc/igc_ptp.c')
0 files changed, 0 insertions, 0 deletions