Guenter Roeck
79da533d3c
hwmon: (nct6775) Fix crash in clear_caseopen
...
Paweł Marciniak reports the following crash, observed when clearing
the chassis intrusion alarm.
BUG: kernel NULL pointer dereference, address: 0000000000000028
PGD 0 P4D 0
Oops: 0000 [#1 ] PREEMPT SMP PTI
CPU: 3 PID: 4815 Comm: bash Tainted: G S 5.16.2-200.fc35.x86_64 #1
Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z97 Extreme4, BIOS P2.60A 05/03/2018
RIP: 0010:clear_caseopen+0x5a/0x120 [nct6775]
Code: 68 70 e8 e9 32 b1 e3 85 c0 0f 85 d2 00 00 00 48 83 7c 24 ...
RSP: 0018:ffffabcb02803dd8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000
RDX: ffff8e8808192880 RSI: 0000000000000000 RDI: ffff8e87c7509a68
RBP: 0000000000000000 R08: 0000000000000001 R09: 000000000000000a
R10: 000000000000000a R11: f000000000000000 R12: 000000000000001f
R13: ffff8e87c7509828 R14: ffff8e87c7509a68 R15: ffff8e88494527a0
FS: 00007f4db9151740(0000) GS:ffff8e8ebfec0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000028 CR3: 0000000166b66001 CR4: 00000000001706e0
Call Trace:
<TASK>
kernfs_fop_write_iter+0x11c/0x1b0
new_sync_write+0x10b/0x180
vfs_write+0x209/0x2a0
ksys_write+0x4f/0xc0
do_syscall_64+0x3b/0x90
entry_SYSCALL_64_after_hwframe+0x44/0xae
The problem is that the device passed to clear_caseopen() is the hwmon
device, not the platform device, and the platform data is not set in the
hwmon device. Store the pointer to sio_data in struct nct6775_data and
get if from there if needed.
Fixes: 2e7b988696 ("hwmon: (nct6775) Use superio_*() function pointers in sio_data.")
Cc: Denis Pauk <pauk.denis@gmail.com >
Cc: Bernhard Seibold <mail@bernhard-seibold.de >
Reported-by: Paweł Marciniak <pmarciniak@lodz.home.pl >
Tested-by: Denis Pauk <pauk.denis@gmail.com >
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
2022-01-24 14:32:47 -08:00
..
2021-11-06 14:08:17 -07:00
2022-01-23 18:21:27 -08:00
2021-10-12 07:22:41 -07:00
2019-11-06 14:37:19 -08:00
2021-10-16 22:41:25 -07:00
2019-05-30 11:25:18 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-04-20 06:50:14 -07:00
2019-05-24 17:36:45 +02:00
2021-12-26 15:02:05 -08:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-12-26 15:02:06 -08:00
2020-12-02 17:42:23 -08:00
2021-05-12 18:53:11 -07:00
2020-09-23 09:42:40 -07:00
2019-05-24 17:36:42 +02:00
2021-10-12 07:22:42 -07:00
2021-10-12 07:22:42 -07:00
2021-10-12 07:22:42 -07:00
2021-10-12 07:22:42 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2022-01-23 18:21:27 -08:00
2020-09-23 09:42:39 -07:00
2021-01-27 17:44:19 -08:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-08-28 08:53:30 -07:00
2019-09-03 12:47:17 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-01-27 17:44:18 -08:00
2019-06-23 18:33:01 -07:00
2021-12-26 15:02:06 -08:00
2021-12-26 15:02:06 -08:00
2021-10-12 07:22:41 -07:00
2021-08-17 14:54:26 -07:00
2021-06-17 04:21:45 -07:00
2020-10-04 08:40:10 -07:00
2021-10-12 07:22:41 -07:00
2021-05-17 19:50:23 -05:00
2021-11-14 16:57:16 -08:00
2021-02-11 20:28:56 -08:00
2019-05-30 11:26:32 -07:00
2022-01-22 08:33:37 +02:00
2021-10-12 07:22:41 -07:00
2020-12-02 17:42:23 -08:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:40 -07:00
2021-10-12 07:22:41 -07:00
2021-12-26 15:02:05 -08:00
2021-10-12 07:22:41 -07:00
2021-08-17 14:54:26 -07:00
2021-10-12 07:22:41 -07:00
2021-04-20 06:50:14 -07:00
2021-10-12 07:22:41 -07:00
2020-09-23 09:42:39 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-01-27 17:44:18 -08:00
2020-09-23 09:42:41 -07:00
2020-09-23 09:42:39 -07:00
2020-08-23 17:36:59 -05:00
2021-10-12 07:22:01 -07:00
2020-08-04 14:24:39 -07:00
2021-10-12 07:22:37 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2020-12-02 17:42:23 -08:00
2020-12-11 07:42:27 -08:00
2021-04-20 06:50:14 -07:00
2021-04-20 06:50:14 -07:00
2021-12-26 15:02:05 -08:00
2021-06-17 04:21:46 -07:00
2021-08-17 14:54:25 -07:00
2021-10-12 07:22:41 -07:00
2021-12-26 15:02:05 -08:00
2019-09-03 12:47:17 -07:00
2021-12-26 15:02:05 -08:00
2021-12-26 15:02:07 -08:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-06-17 04:21:44 -07:00
2020-09-23 09:42:40 -07:00
2021-06-17 04:21:44 -07:00
2020-05-22 06:28:38 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2022-01-23 18:21:27 -08:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2020-09-23 09:42:39 -07:00
2021-10-12 07:22:41 -07:00
2020-09-23 09:42:39 -07:00
2019-04-15 17:19:53 -07:00
2021-04-20 06:50:14 -07:00
2021-09-24 05:02:24 -07:00
2020-09-23 09:42:40 -07:00
2019-11-06 14:37:19 -08:00
2019-11-06 14:37:19 -08:00
2021-04-20 06:50:14 -07:00
2022-01-15 08:47:31 -08:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-04-20 06:50:14 -07:00
2020-09-23 09:42:39 -07:00
2021-04-20 06:50:14 -07:00
2021-10-12 07:22:41 -07:00
2019-05-21 11:28:45 +02:00
2021-12-26 15:02:07 -08:00
2020-12-02 17:42:24 -08:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:06 +02:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:37 -07:00
2021-05-17 19:50:37 -05:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-01-27 17:44:18 -08:00
2021-04-20 06:50:14 -07:00
2021-10-12 07:22:41 -07:00
2021-10-16 22:42:14 -07:00
2020-09-23 09:42:39 -07:00
2021-06-17 04:21:46 -07:00
2019-02-18 14:23:29 -08:00
2020-09-23 09:42:39 -07:00
2019-05-30 11:26:32 -07:00
2021-10-12 07:22:41 -07:00
2021-12-26 15:02:07 -08:00
2021-10-12 07:22:39 -07:00
2022-01-24 14:32:47 -08:00
2021-10-28 21:27:38 -07:00
2020-09-23 09:42:39 -07:00
2019-09-03 12:47:17 -07:00
2019-06-05 17:37:14 +02:00
2021-12-26 15:02:06 -08:00
2021-04-20 06:50:14 -07:00
2022-01-09 17:10:58 -08:00
2021-10-12 07:22:41 -07:00
2019-05-30 11:26:41 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2021-11-30 06:44:18 -08:00
2021-12-26 15:02:06 -08:00
2021-04-20 06:50:14 -07:00
2021-08-17 14:54:25 -07:00
2020-12-12 08:32:35 -08:00
2021-06-17 04:21:44 -07:00
2021-06-17 04:21:44 -07:00
2021-06-17 04:21:44 -07:00
2021-10-12 07:22:41 -07:00
2021-03-30 16:34:55 +01:00
2021-06-09 11:51:30 -07:00
2020-09-23 09:42:39 -07:00
2021-12-26 15:02:06 -08:00
2019-04-17 10:37:23 -07:00
2021-10-12 07:22:41 -07:00
2020-09-23 09:42:40 -07:00
2021-10-12 07:22:41 -07:00
2020-09-17 16:02:42 +01:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-01-27 17:44:17 -08:00
2021-10-12 07:22:41 -07:00
2020-09-23 09:39:40 -07:00
2021-04-20 06:50:14 -07:00
2020-09-23 09:42:39 -07:00
2020-09-23 09:42:39 -07:00
2021-10-12 07:22:41 -07:00
2020-09-23 09:42:39 -07:00
2021-10-12 07:22:41 -07:00
2020-09-23 09:42:39 -07:00
2021-12-26 15:02:05 -08:00
2021-10-18 07:23:21 -07:00
2020-10-04 08:40:10 -07:00
2021-06-10 08:40:09 -07:00
2019-05-21 10:50:45 +02:00
2021-04-20 06:50:14 -07:00
2021-10-12 07:22:41 -07:00
2020-03-24 21:33:36 +01:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2020-09-23 09:42:39 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2021-10-12 07:22:41 -07:00
2019-06-05 17:30:30 +02:00
2019-06-05 17:30:30 +02:00
2021-12-28 08:04:10 -08:00