Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
phy: gmii2rgmii: Add check for external phy driver
Add a check for external phy driver to be probed before dereferencing phy driver pointer. This fixes the following crash: [ 2.439334] libphy: MACB_mii_bus: probed [ 2.444797] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 2.452689] Mem abort info: [ 2.455453] Exception class = DABT (current EL), IL = 32 bits [ 2.461334] SET = 0, FnV = 0 [ 2.464361] EA = 0, S1PTW = 0 [ 2.467474] Data abort info: [ 2.470325] ISV = 0, ISS = 0x00000005 [ 2.474135] CM = 0, WnR = 0 [ 2.477077] [0000000000000000] user address but active_mm is swapper [ 2.483392] Internal error: Oops: 96000005 1 SMP [ 2.488232] Modules linked in: [ 2.491261] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.14.0-xilinx-v2018.2 #1 [ 2.498438] Hardware name: ZynqMP ZC1275 RevB (DT) [ 2.503196] task: ffffffc06d846d00 task.stack: ffffff8008038000 [ 2.509085] PC is at __memcpy+0x100/0x180 [ 2.513061] LR is at xgmiitorgmii_probe+0x7c/0xf0 Signed-off-by: Harini Katakam <harini.katakam@xilinx.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
- Loading branch information