Zheyu Ma
45c8ddd06c
mmc: via-sdmmc: add a check against NULL pointer dereference
...
Before referencing 'host->data', the driver needs to check whether it is
null pointer, otherwise it will cause a null pointer reference.
This log reveals it:
[ 29.355199] BUG: kernel NULL pointer dereference, address:
0000000000000014
[ 29.357323] #PF: supervisor write access in kernel mode
[ 29.357706] #PF: error_code(0x0002) - not-present page
[ 29.358088] PGD 0 P4D 0
[ 29.358280] Oops: 0002 [#1 ] PREEMPT SMP PTI
[ 29.358595] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.12.4-
g70e7f0549188-dirty #102
[ 29.359164] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009),
BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014
[ 29.359978] RIP: 0010:via_sdc_isr+0x21f/0x410
[ 29.360314] Code: ff ff e8 84 aa d0 fd 66 45 89 7e 28 66 41 f7 c4 00
10 75 56 e8 72 aa d0 fd 66 41 f7 c4 00 c0 74 10 e8 65 aa d0 fd 48 8b 43
18 <c7> 40 14 ac ff ff ff e8 55 aa d0 fd 48 89 df e8 ad fb ff ff e9 77
[ 29.361661] RSP: 0018:ffffc90000118e98 EFLAGS: 00010046
[ 29.362042] RAX: 0000000000000000 RBX: ffff888107d77880
RCX: 0000000000000000
[ 29.362564] RDX: 0000000000000000 RSI: ffffffff835d20bb
RDI: 00000000ffffffff
[ 29.363085] RBP: ffffc90000118ed8 R08: 0000000000000001
R09: 0000000000000001
[ 29.363604] R10: 0000000000000000 R11: 0000000000000001
R12: 0000000000008600
[ 29.364128] R13: ffff888107d779c8 R14: ffffc90009c00200
R15: 0000000000008000
[ 29.364651] FS: 0000000000000000(0000) GS:ffff88817bc80000(0000)
knlGS:0000000000000000
[ 29.365235] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 29.365655] CR2: 0000000000000014 CR3: 0000000005a2e000
CR4: 00000000000006e0
[ 29.366170] DR0: 0000000000000000 DR1: 0000000000000000
DR2: 0000000000000000
[ 29.366683] DR3: 0000000000000000 DR6: 00000000fffe0ff0
DR7: 0000000000000400
[ 29.367197] Call Trace:
[ 29.367381] <IRQ>
[ 29.367537] __handle_irq_event_percpu+0x53/0x3e0
[ 29.367916] handle_irq_event_percpu+0x35/0x90
[ 29.368247] handle_irq_event+0x39/0x60
[ 29.368632] handle_fasteoi_irq+0xc2/0x1d0
[ 29.368950] __common_interrupt+0x7f/0x150
[ 29.369254] common_interrupt+0xb4/0xd0
[ 29.369547] </IRQ>
[ 29.369708] asm_common_interrupt+0x1e/0x40
[ 29.370016] RIP: 0010:native_safe_halt+0x17/0x20
[ 29.370360] Code: 07 0f 00 2d db 80 43 00 f4 5d c3 0f 1f 84 00 00 00
00 00 8b 05 c2 37 e5 01 55 48 89 e5 85 c0 7e 07 0f 00 2d bb 80 43 00 fb
f4 <5d> c3 cc cc cc cc cc cc cc 55 48 89 e5 e8 67 53 ff ff 8b 0d f9 91
[ 29.371696] RSP: 0018:ffffc9000008fe90 EFLAGS: 00000246
[ 29.372079] RAX: 0000000000000000 RBX: 0000000000000002
RCX: 0000000000000000
[ 29.372595] RDX: 0000000000000000 RSI: ffffffff854f67a4
RDI: ffffffff85403406
[ 29.373122] RBP: ffffc9000008fe90 R08: 0000000000000001
R09: 0000000000000001
[ 29.373646] R10: 0000000000000000 R11: 0000000000000001
R12: ffffffff86009188
[ 29.374160] R13: 0000000000000000 R14: 0000000000000000
R15: ffff888100258000
[ 29.374690] default_idle+0x9/0x10
[ 29.374944] arch_cpu_idle+0xa/0x10
[ 29.375198] default_idle_call+0x6e/0x250
[ 29.375491] do_idle+0x1f0/0x2d0
[ 29.375740] cpu_startup_entry+0x18/0x20
[ 29.376034] start_secondary+0x11f/0x160
[ 29.376328] secondary_startup_64_no_verify+0xb0/0xbb
[ 29.376705] Modules linked in:
[ 29.376939] Dumping ftrace buffer:
[ 29.377187] (ftrace buffer empty)
[ 29.377460] CR2: 0000000000000014
[ 29.377712] ---[ end trace 51a473dffb618c47 ]---
[ 29.378056] RIP: 0010:via_sdc_isr+0x21f/0x410
[ 29.378380] Code: ff ff e8 84 aa d0 fd 66 45 89 7e 28 66 41 f7 c4 00
10 75 56 e8 72 aa d0 fd 66 41 f7 c4 00 c0 74 10 e8 65 aa d0 fd 48 8b 43
18 <c7> 40 14 ac ff ff ff e8 55 aa d0 fd 48 89 df e8 ad fb ff ff e9 77
[ 29.379714] RSP: 0018:ffffc90000118e98 EFLAGS: 00010046
[ 29.380098] RAX: 0000000000000000 RBX: ffff888107d77880
RCX: 0000000000000000
[ 29.380614] RDX: 0000000000000000 RSI: ffffffff835d20bb
RDI: 00000000ffffffff
[ 29.381134] RBP: ffffc90000118ed8 R08: 0000000000000001
R09: 0000000000000001
[ 29.381653] R10: 0000000000000000 R11: 0000000000000001
R12: 0000000000008600
[ 29.382176] R13: ffff888107d779c8 R14: ffffc90009c00200
R15: 0000000000008000
[ 29.382697] FS: 0000000000000000(0000) GS:ffff88817bc80000(0000)
knlGS:0000000000000000
[ 29.383277] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 29.383697] CR2: 0000000000000014 CR3: 0000000005a2e000
CR4: 00000000000006e0
[ 29.384223] DR0: 0000000000000000 DR1: 0000000000000000
DR2: 0000000000000000
[ 29.384736] DR3: 0000000000000000 DR6: 00000000fffe0ff0
DR7: 0000000000000400
[ 29.385260] Kernel panic - not syncing: Fatal exception in interrupt
[ 29.385882] Dumping ftrace buffer:
[ 29.386135] (ftrace buffer empty)
[ 29.386401] Kernel Offset: disabled
[ 29.386656] Rebooting in 1 seconds..
Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Link: https://lore.kernel.org/r/1622727200-15808-1-git-send-email-zheyuma97@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-06-14 13:57:43 +02:00
..
2020-09-07 14:24:21 +02:00
2021-02-08 13:00:31 +01:00
2021-02-08 13:00:31 +01:00
2020-09-07 14:24:21 +02:00
2020-09-07 14:24:21 +02:00
2019-12-18 12:55:11 +01:00
2021-03-30 11:42:06 +02:00
2021-02-15 10:43:23 +01:00
2019-06-19 17:09:55 +02:00
2021-06-14 13:57:40 +02:00
2021-02-01 12:02:33 +01:00
2021-02-01 12:02:33 +01:00
2021-02-01 12:02:33 +01:00
2020-11-16 11:59:28 +01:00
2020-09-07 14:24:21 +02:00
2020-09-07 14:20:17 +02:00
2019-05-30 11:26:32 -07:00
2020-09-07 14:24:21 +02:00
2021-03-31 14:47:53 +02:00
2019-05-30 11:26:32 -07:00
2021-06-14 13:57:42 +02:00
2019-05-30 11:26:32 -07:00
2021-04-16 15:10:08 +02:00
2021-03-30 11:42:02 +02:00
2019-05-30 11:26:32 -07:00
2021-06-14 13:57:38 +02:00
2021-03-30 11:42:05 +02:00
2021-04-23 09:29:49 +02:00
2021-05-10 14:29:39 +02:00
2020-05-28 11:22:15 +02:00
2020-09-07 14:24:21 +02:00
2020-05-28 11:22:14 +02:00
2020-11-16 11:59:29 +01:00
2020-05-28 11:20:59 +02:00
2020-05-28 11:20:59 +02:00
2021-06-14 13:57:42 +02:00
2019-06-05 17:36:37 +02:00
2020-05-29 12:38:00 +02:00
2021-03-09 10:00:52 +01:00
2020-03-24 14:35:40 +01:00
2021-04-12 08:54:06 +02:00
2021-06-14 13:57:40 +02:00
2020-09-07 14:20:17 +02:00
2019-06-19 17:09:55 +02:00
2020-11-24 15:18:19 +01:00
2021-02-01 11:54:41 +01:00
2021-06-14 13:57:42 +02:00
2021-02-01 11:54:47 +01:00
2021-02-08 13:00:31 +01:00
2021-04-12 13:52:47 +02:00
2020-11-24 12:35:34 +01:00
2021-06-08 14:56:54 +02:00
2021-04-12 13:52:47 +02:00
2021-04-12 13:52:47 +02:00
2021-03-30 11:42:05 +02:00
2021-02-01 11:54:45 +01:00
2020-09-25 13:24:02 +02:00
2021-06-14 13:57:34 +02:00
2019-07-11 18:11:21 -07:00
2021-06-14 13:57:41 +02:00
2020-09-07 14:20:17 +02:00
2019-11-13 16:10:16 +01:00
2021-06-14 13:57:35 +02:00
2020-09-07 14:20:17 +02:00
2021-03-30 12:42:44 +02:00
2020-09-07 14:24:21 +02:00
2020-09-07 14:20:17 +02:00
2020-09-07 14:20:17 +02:00
2021-06-14 13:57:43 +02:00
2021-03-30 11:42:07 +02:00
2020-10-28 11:07:01 +01:00
2021-02-01 11:54:48 +01:00
2020-09-07 14:24:21 +02:00
2021-04-28 15:56:51 -07:00
2021-02-01 11:54:46 +01:00
2021-02-01 11:54:49 +01:00
2021-06-14 13:57:42 +02:00
2020-09-07 14:20:17 +02:00
2021-03-30 11:42:07 +02:00
2021-04-23 09:29:49 +02:00
2020-09-07 14:20:17 +02:00
2020-09-07 14:24:21 +02:00
2021-06-14 13:57:41 +02:00
2021-03-31 14:49:32 +02:00
2019-05-21 10:50:45 +02:00
2018-07-16 11:21:45 +02:00
2021-06-14 13:57:38 +02:00
2021-03-30 11:42:00 +02:00
2021-03-30 11:42:07 +02:00
2020-11-16 11:59:30 +01:00
2019-09-11 15:58:39 +02:00
2021-02-01 11:13:09 +01:00
2020-09-07 14:20:17 +02:00
2020-09-07 14:20:17 +02:00
2021-04-15 14:00:15 +02:00
2020-09-07 14:20:17 +02:00
2021-06-14 13:57:43 +02:00
2021-04-12 13:52:48 +02:00
2021-04-12 13:52:29 +02:00
2020-12-11 10:08:37 +01:00
2021-02-01 11:54:45 +01:00
2020-12-11 10:08:37 +01:00
2021-03-30 11:42:07 +02:00
2020-07-13 12:18:24 +02:00
2020-05-28 11:22:14 +02:00
2020-09-07 14:20:17 +02:00
2021-02-01 11:54:45 +01:00
2021-02-08 13:00:31 +01:00
2021-04-15 13:59:02 +02:00
2020-11-17 12:46:39 +01:00
2021-03-30 11:42:01 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2021-03-30 11:41:59 +02:00
2021-06-14 13:57:37 +02:00
2019-05-30 11:26:32 -07:00
2021-06-14 13:57:43 +02:00
2021-06-14 13:57:41 +02:00
2021-02-08 13:00:31 +01:00
2019-05-30 11:26:32 -07:00
2020-09-07 14:20:17 +02:00