Shawn.Shao
20d0a6d17e
Add exception protection processing for vd in axi_chan_handle_err function
...
commit 57054fe516
upstream.
Since there is no protection for vd, a kernel panic will be
triggered here in exceptional cases.
You can refer to the processing of axi_chan_block_xfer_complete function
The triggered kernel panic is as follows:
[ 67.848444] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000060
[ 67.848447] Mem abort info:
[ 67.848449] ESR = 0x96000004
[ 67.848451] EC = 0x25: DABT (current EL), IL = 32 bits
[ 67.848454] SET = 0, FnV = 0
[ 67.848456] EA = 0, S1PTW = 0
[ 67.848458] Data abort info:
[ 67.848460] ISV = 0, ISS = 0x00000004
[ 67.848462] CM = 0, WnR = 0
[ 67.848465] user pgtable: 4k pages, 48-bit VAs, pgdp=00000800c4c0b000
[ 67.848468] [0000000000000060] pgd=0000000000000000, p4d=0000000000000000
[ 67.848472] Internal error: Oops: 96000004 [#1 ] SMP
[ 67.848475] Modules linked in: dmatest
[ 67.848479] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.100-emu_x2rc+ #11
[ 67.848483] pstate: 62000085 (nZCv daIf -PAN -UAO +TCO BTYPE=--)
[ 67.848487] pc : axi_chan_handle_err+0xc4/0x230
[ 67.848491] lr : axi_chan_handle_err+0x30/0x230
[ 67.848493] sp : ffff0803fe55ae50
[ 67.848495] x29: ffff0803fe55ae50 x28: ffff800011212200
[ 67.848500] x27: ffff0800c42c0080 x26: ffff0800c097c080
[ 67.848504] x25: ffff800010d33880 x24: ffff80001139d850
[ 67.848508] x23: ffff0800c097c168 x22: 0000000000000000
[ 67.848512] x21: 0000000000000080 x20: 0000000000002000
[ 67.848517] x19: ffff0800c097c080 x18: 0000000000000000
[ 67.848521] x17: 0000000000000000 x16: 0000000000000000
[ 67.848525] x15: 0000000000000000 x14: 0000000000000000
[ 67.848529] x13: 0000000000000000 x12: 0000000000000040
[ 67.848533] x11: ffff0800c0400248 x10: ffff0800c040024a
[ 67.848538] x9 : ffff800010576cd4 x8 : ffff0800c0400270
[ 67.848542] x7 : 0000000000000000 x6 : ffff0800c04003e0
[ 67.848546] x5 : ffff0800c0400248 x4 : ffff0800c4294480
[ 67.848550] x3 : dead000000000100 x2 : dead000000000122
[ 67.848555] x1 : 0000000000000100 x0 : ffff0800c097c168
[ 67.848559] Call trace:
[ 67.848562] axi_chan_handle_err+0xc4/0x230
[ 67.848566] dw_axi_dma_interrupt+0xf4/0x590
[ 67.848569] __handle_irq_event_percpu+0x60/0x220
[ 67.848573] handle_irq_event+0x64/0x120
[ 67.848576] handle_fasteoi_irq+0xc4/0x220
[ 67.848580] __handle_domain_irq+0x80/0xe0
[ 67.848583] gic_handle_irq+0xc0/0x138
[ 67.848585] el1_irq+0xc8/0x180
[ 67.848588] arch_cpu_idle+0x14/0x2c
[ 67.848591] default_idle_call+0x40/0x16c
[ 67.848594] do_idle+0x1f0/0x250
[ 67.848597] cpu_startup_entry+0x2c/0x60
[ 67.848600] rest_init+0xc0/0xcc
[ 67.848603] arch_call_rest_init+0x14/0x1c
[ 67.848606] start_kernel+0x4cc/0x500
[ 67.848610] Code: eb0002ff 9a9f12d6 f2fbd5a2 f2fbd5a3 (a94602c1)
[ 67.848613] ---[ end trace 585a97036f88203a ]---
Signed-off-by: Shawn.Shao <shawn.shao@jaguarmicro.com >
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230112055802.1764-1-shawn.shao@jaguarmicro.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 07:19:56 +01:00
..
2022-09-23 14:16:56 +02:00
2021-04-21 13:00:50 +02:00
2023-01-24 07:19:56 +01:00
2022-08-21 15:15:55 +02:00
2021-06-23 14:42:40 +02:00
2021-03-04 11:37:55 +01:00
2022-06-14 18:32:47 +02:00
2022-10-26 13:25:39 +02:00
2020-09-18 12:19:06 +05:30
2022-04-27 13:53:48 +02:00
2020-09-18 12:19:07 +05:30
2021-06-23 14:42:40 +02:00
2022-08-21 15:15:57 +02:00
2022-04-13 21:01:10 +02:00
2022-09-28 11:10:29 +02:00
2022-10-15 07:55:52 +02:00
2021-09-26 14:08:57 +02:00
2020-10-08 15:18:37 +05:30
2020-08-23 17:36:59 -05:00
2022-11-16 09:57:17 +01:00
2022-11-16 09:57:20 +01:00
2022-07-12 16:32:23 +02:00
2020-09-11 17:42:12 +05:30
2020-02-13 20:15:35 +05:30
2019-05-30 11:29:22 -07:00
2020-09-18 12:18:11 +05:30
2019-05-30 11:29:22 -07:00
2020-09-11 17:42:12 +05:30
2020-10-05 09:58:48 +05:30
2021-04-21 13:00:50 +02:00
2021-11-18 14:04:24 +01:00
2020-09-22 20:18:41 +05:30
2020-09-18 12:18:11 +05:30
2020-10-05 09:59:17 +05:30
2020-07-06 14:49:22 +05:30
2020-07-06 10:24:49 +05:30
2020-06-24 13:05:01 +05:30
2021-07-20 16:05:38 +02:00
2021-03-04 11:37:55 +01:00
2020-08-29 13:50:56 -07:00
2022-10-26 13:25:34 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:15 +02:00
2021-08-12 13:22:05 +02:00
2022-07-12 16:32:22 +02:00
2020-10-01 10:18:59 +05:30
2020-08-23 17:36:59 -05:00
2020-09-18 12:19:06 +05:30
2021-09-26 14:09:00 +02:00
2019-06-19 17:09:55 +02:00
2020-10-28 19:12:03 +01:00
2020-06-24 13:06:15 +05:30
2020-06-15 23:08:30 -05:00
2021-01-17 14:17:02 +01:00
2022-01-27 10:54:07 +01:00
2020-09-18 12:19:06 +05:30
2020-06-15 23:08:30 -05:00
2020-09-18 12:19:06 +05:30
2022-11-16 09:57:12 +01:00
2020-09-18 12:19:06 +05:30
2019-06-05 17:36:37 +02:00
2022-10-30 09:41:18 +01:00
2020-09-18 12:19:06 +05:30
2021-08-26 08:35:36 -04:00
2021-03-04 11:37:55 +01:00
2020-09-18 12:19:06 +05:30
2022-07-12 16:32:23 +02:00
2021-04-21 13:00:51 +02:00
2022-11-16 09:57:12 +01:00
2020-01-23 17:03:25 +05:30
2020-09-18 12:19:07 +05:30
2020-09-18 12:19:07 +05:30
2022-08-25 11:38:17 +02:00
2021-12-22 09:30:53 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:29:22 -07:00
2021-06-23 14:42:40 +02:00
2021-08-12 13:22:04 +02:00
2022-02-23 12:01:07 +01:00
2022-06-09 10:21:20 +02:00
2020-07-15 17:50:47 +05:30
2020-09-18 12:19:07 +05:30
2021-04-28 13:40:01 +02:00
2020-06-24 15:11:39 +05:30
2020-09-18 12:19:07 +05:30
2020-09-18 12:19:07 +05:30
2019-06-19 17:09:55 +02:00
2020-02-13 20:15:57 +05:30
2022-01-27 10:54:29 +01:00
2020-09-18 12:19:07 +05:30
2019-12-26 10:04:18 +05:30
2020-09-18 12:19:07 +05:30
2020-09-18 12:30:50 +05:30