diff options
author | Sriranjani P <sriranjani.p@samsung.com> | 2021-05-28 09:10:56 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-05-30 22:41:55 +0200 |
commit | 593f555fbc6091bbaec8dd2a38b47ee643412e61 (patch) | |
tree | fd9547dd108b47beb54652b025c71f478148bb28 /net/mac80211/ieee80211_i.h | |
parent | Merge branch 'mptcp-fixes-for-5-13' (diff) | |
download | linux-593f555fbc6091bbaec8dd2a38b47ee643412e61.tar.xz linux-593f555fbc6091bbaec8dd2a38b47ee643412e61.zip |
net: stmmac: fix kernel panic due to NULL pointer dereference of mdio_bus_data
Fixed link does not need mdio bus and in that case mdio_bus_data will
not be allocated. Before using mdio_bus_data we should check for NULL.
This patch fix the kernel panic due to NULL pointer dereference of
mdio_bus_data when it is not allocated.
Without this patch we do see following kernel crash caused due to kernel
NULL pointer dereference.
Call trace:
stmmac_dvr_probe+0x3c/0x10b0
dwc_eth_dwmac_probe+0x224/0x378
platform_probe+0x68/0xe0
really_probe+0x130/0x3d8
driver_probe_device+0x68/0xd0
device_driver_attach+0x74/0x80
__driver_attach+0x58/0xf8
bus_for_each_dev+0x7c/0xd8
driver_attach+0x24/0x30
bus_add_driver+0x148/0x1f0
driver_register+0x64/0x120
__platform_driver_register+0x28/0x38
dwc_eth_dwmac_driver_init+0x1c/0x28
do_one_initcall+0x78/0x158
kernel_init_freeable+0x1f0/0x244
kernel_init+0x14/0x118
ret_from_fork+0x10/0x30
Code: f9002bfb 9113e2d9 910e6273 aa0003f7 (f9405c78)
---[ end trace 32d9d41562ddc081 ]---
Fixes: e5e5b771f684 ("net: stmmac: make in-band AN mode parsing is supported for non-DT")
Signed-off-by: Sriranjani P <sriranjani.p@samsung.com>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Link: https://lore.kernel.org/r/20210528071056.35252-1-sriranjani.p@samsung.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
0 files changed, 0 insertions, 0 deletions