summaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2022-09-25 15:48:43 +0100
committerJakub Kicinski <kuba@kernel.org>2022-09-27 07:43:54 -0700
commit454b20e19322e6a9375cbaad68fff3c93bd27716 (patch)
treebd9a220f2a3ba2f136d6a21c4e013cce6db8c980 /net/nfc
parentfb7da771bc43d004bc150101a12a2b245b3ba6dc (diff)
downloadlinux-stable-454b20e19322e6a9375cbaad68fff3c93bd27716.tar.gz
linux-stable-454b20e19322e6a9375cbaad68fff3c93bd27716.tar.bz2
linux-stable-454b20e19322e6a9375cbaad68fff3c93bd27716.zip
net: ethernet: mtk_eth_soc: fix usage of foe_entry_size
As sizeof(hwe->data) can now longer be used as the actual size depends on foe_entry_size, in commit 9d8cb4c096ab02 ("net: ethernet: mtk_eth_soc: add foe_entry_size to mtk_eth_soc") the use of sizeof(hwe->data) is hence replaced. However, replacing it with ppe->eth->soc->foe_entry_size is wrong as foe_entry_size represents the size of the whole descriptor and not just the 'data' field. Fix this by subtracing the size of the only other field in the struct 'ib1', so we actually end up with the correct size to be copied to the data field. Reported-by: Chen Minqiang <ptpt52@gmail.com> Fixes: 9d8cb4c096ab02 ("net: ethernet: mtk_eth_soc: add foe_entry_size to mtk_eth_soc") Signed-off-by: Daniel Golle <daniel@makrotopia.org> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/YzBqPIgQR2gLrPoK@makrotopia.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/nfc')
0 files changed, 0 insertions, 0 deletions