Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: ethernet: xilinx: Fix kernel crash on 64-bit platform
In the driver ptp_tx_skb variable stores the skb address This variable is of type u32. On 64-bit platform it is causing a kernel crash when trying to access this variable. Crash log: [ 58.675430] Unable to handle kernel paging request at virtual address 6e882cc8 [ 58.682583] pgd = ffffffc0018d7000 [ 58.685956] [6e882cc8] *pgd=0000000000000000, *pud=0000000000000000 [ 58.692206] Internal error: Oops: 96000005 [#1] SMP [ 58.697067] Modules linked in: [ 58.700106] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.0 #195 [ 58.706095] Hardware name: ZynqMP ZCU102 (DT) [ 58.710435] task: ffffffc00180a8c0 ti: ffffffc0017fc000 task.ti: ffffffc0017fc000 [ 58.717912] PC is at axienet_tx_irq+0x1f4/0x3fc [ 58.722416] LR is at handle_irq_event_percpu+0x94/0x13c [ 58.727622] pc : [<ffffffc00051d54c>] lr : [<ffffffc0000d1194>] pstate: 000001c5 [ 58.735005] sp : ffffffc0017ffc30 [ 58.738296] x29: ffffffc0017ffc30 x28: ffffff8000279a00 [ 58.743589] x27: ffffffc071bed700 x26: ffffffc000913b70 [ 58.748884] x25: ffffffc0007e7130 x24: ffffffc071afbe00 [ 58.754179] x23: ffffffc071bed000 x22: 0000000000000000 [ 58.759473] x21: 0000000000000000 x20: ffffffc071bed000 [ 58.764768] x19: 0000000080000056 x18: 0000007fef55a510 [ 58.770063] x17: 0000007f8f15d0c0 x16: ffffffc00017d4ec [ 58.775358] x15: ffffffffffffffff x14: ffffffffffffff00 [ 58.780653] x13: ffffffffffffffff x12: 0000000000000008 [ 58.785948] x11: 0101010101010101 x10: 00000000000006e0 [ 58.791242] x9 : ffffffc0017ffe70 x8 : ffffffc071400768 [ 58.796537] x7 : ffffffc0714006c8 x6 : 0000000000000000 [ 58.801832] x5 : 00000000fffffffa x4 : 00000000767af000 [ 58.807126] x3 : 0000000000000000 x2 : ffffff80001c0000 [ 58.812421] x1 : ffffffc071bed000 x0 : 000000006e882c00 [ 58.817715] [ 58.819194] Process swapper/0 (pid: 0, stack limit = 0xffffffc0017fc020) [ 58.825880] Stack: (0xffffffc0017ffc30 to 0xffffffc001800000) [ 58.831609] fc20: ffffffc0017ffca0 ffffffc0000d1194 [ 58.839428] fc40: ffffffc06e881280 ffffffc001835580 0000000000000000 0000000000000000 [ 58.847240] fc60: 00000000000000cf ffffffc071afbe00 ffffffc00187c3cb ffffffc000913b70 [ 58.855052] fc80: ffffffc000913b98 0000000000000000 ffffffc00187c3cb ffffffc0009799f0 [ 58.862864] fca0: ffffffc0017ffd00 ffffffc0000d1280 ffffffc071afbe00 ffffffc001835580 [ 58.870676] fcc0: ffffffc071afbe9c ffffffc001805040 ffffff8000014010 ffffff8000015000 [ 58.878488] fce0: ffffffc000766cd0 ffffffc00187c000 0000000000000000 ffffffc0000eeb4c [ 58.886300] fd00: ffffffc0017ffd30 ffffffc0000d461c ffffffc071afbe00 ffffffc001835580 [ 58.894112] fd20: 0000000000000000 ffffffc00009b18c ffffffc0017ffd50 ffffffc0000d07a0 [ 58.901924] fd40: ffffffc0017e5000 0000000000000000 ffffffc0017ffd60 ffffffc0000d0ab8 [ 58.909736] fd60: ffffffc0017ffda0 ffffffc000080cec ffffff800001400c ffffffc001835000 [ 58.917548] fd80: ffffffc0017ffde0 ffffffc07132c1e0 ffffffc071808000 0000007900757990 [ 58.925360] fda0: ffffffc0017fff00 ffffffc000083da8 ffffffc0017fc000 ffffffc001802000 [ 58.933172] fdc0: ffffffc0017fff00 ffffffc000084e70 0000000060000145 ffffffc0017e6c78 [ 58.940983] fde0: 0000000000000000 0000000000000000 0000000000000001 0000000000000000 [ 58.948796] fe00: 0000000000000000 00000000767af000 ffffffc001802ad0 00000000ffff1452 [ 58.956608] fe20: ffffffc00180b000 ffffffc0017ffe70 00000000000006e0 0101010101010101 [ 58.964420] fe40: 0000000000000008 ffffffffffffffff ffffffffffffff00 ffffffffffffffff [ 58.972232] fe60: ffffffc00017d4ec 0000007f8f15d0c0 0000007fef55a510 ffffffc0017fc000 [ 58.980044] fe80: ffffffc001802000 ffffffc001802ad0 ffffffc0017e39c0 ffffffc0017fff20 [ 58.987856] fea0: ffffffc0017e6c78 ffffffc000766cd0 ffffffc00187c000 0000000000000000 [ 58.995668] fec0: 0000000000000000 ffffffc0017fff00 ffffffc000084e6c ffffffc0017fff00 [ 59.003480] fee0: ffffffc000084e70 0000000060000145 ffffffc000766cd0 ffffffc000757ca8 [ 59.011292] ff00: ffffffc0017fff10 ffffffc0000c99f8 ffffffc0017fff20 ffffffc0000c9b30 [ 59.019104] ff20: ffffffc0017fff90 ffffffc000754f08 ffffffc00187f000 ffffffc00187f000 [ 59.026916] ff40: ffffffc00187f000 ffffffc001802000 ffffffc077fd0000 ffffffc000a462c8 [ 59.034728] ff60: 00000000018d4000 00000000018d7000 ffffffc0000801d8 000000007df4ae40 [ 59.042540] ff80: ffffffc0017fff90 ffffffc000754f00 ffffffc0017fffa0 ffffffc000a1594c [ 59.050352] ffa0: 0000000000000000 000000000075c000 0000000000000400 0000000000000e12 [ 59.058163] ffc0: 0000000007ff5000 0000000000000003 000000007df47c88 0000000000000000 [ 59.065975] ffe0: 0000000000000000 ffffffc000a462c8 0000000000000000 0000000000000000 [ 59.073785] Call trace: [ 59.076211] [<ffffffc00051d54c>] axienet_tx_irq+0x1f4/0x3fc [ 59.081767] [<ffffffc0000d1194>] handle_irq_event_percpu+0x94/0x13c [ 59.088017] [<ffffffc0000d1280>] handle_irq_event+0x44/0x74 [ 59.093573] [<ffffffc0000d461c>] handle_fasteoi_irq+0xac/0x19c [ 59.099387] [<ffffffc0000d07a0>] generic_handle_irq+0x24/0x38 [ 59.105116] [<ffffffc0000d0ab8>] __handle_domain_irq+0x60/0xac [ 59.110932] [<ffffffc000080cec>] gic_handle_irq+0x60/0xb4 [ 59.116312] Exception stack(0xffffffc0017ffdb0 to 0xffffffc0017ffed0) [ 59.122736] fda0: ffffffc0017fc000 ffffffc001802000 [ 59.130555] fdc0: ffffffc0017fff00 ffffffc000084e70 0000000060000145 ffffffc0017e6c78 [ 59.138366] fde0: 0000000000000000 0000000000000000 0000000000000001 0000000000000000 [ 59.146179] fe00: 0000000000000000 00000000767af000 ffffffc001802ad0 00000000ffff1452 [ 59.153991] fe20: ffffffc00180b000 ffffffc0017ffe70 00000000000006e0 0101010101010101 [ 59.161803] fe40: 0000000000000008 ffffffffffffffff ffffffffffffff00 ffffffffffffffff [ 59.169615] fe60: ffffffc00017d4ec 0000007f8f15d0c0 0000007fef55a510 ffffffc0017fc000 [ 59.177427] fe80: ffffffc001802000 ffffffc001802ad0 ffffffc0017e39c0 ffffffc0017fff20 [ 59.185239] fea0: ffffffc0017e6c78 ffffffc000766cd0 ffffffc00187c000 0000000000000000 [ 59.193050] fec0: 0000000000000000 ffffffc0017fff00 [ 59.197905] [<ffffffc000083da8>] el1_irq+0x68/0xc0 [ 59.202680] [<ffffffc0000c99f8>] default_idle_call+0x1c/0x30 [ 59.208322] [<ffffffc0000c9b30>] cpu_startup_entry+0x124/0x1dc [ 59.214138] [<ffffffc000754f08>] rest_init+0x74/0x7c [ 59.219086] [<ffffffc000a1594c>] start_kernel+0x394/0x3a8 [ 59.224465] [<000000000075c000>] 0x75c000 [ 59.228459] Code: b9404380 34fffb60 2a0003e0 f944a2e2 (b940c818) This patch fixes this issue. Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
- Loading branch information