mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 01:45:18 +02:00
net: ethernet: mtk_wed: check update_wo_rx_stats in mtk_wed_update_rx_stats()
[ Upstream commit 486e6ca6b4
]
Check if update_wo_rx_stats function pointer is properly set in
mtk_wed_update_rx_stats routine before accessing it.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/b0d233386e059bccb59f18f69afb79a7806e5ded.1694507226.git.lorenzo@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
81ba4dd37a
commit
7ede6ef04c
|
@ -68,6 +68,9 @@ mtk_wed_update_rx_stats(struct mtk_wed_device *wed, struct sk_buff *skb)
|
|||
struct mtk_wed_wo_rx_stats *stats;
|
||||
int i;
|
||||
|
||||
if (!wed->wlan.update_wo_rx_stats)
|
||||
return;
|
||||
|
||||
if (count * sizeof(*stats) > skb->len - sizeof(u32))
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user