Kamlakant Patel
b4cc441afd
ipmi_ssif: Fix kernel panic at msg_done_handler
...
[ Upstream commit f002612b9d86613bc6fde0a444e0095225f6053e ]
This happens when BMC doesn't return any data and the code is trying
to print the value of data[2].
Getting following crash:
[ 484.728410] Unable to handle kernel NULL pointer dereference at virtual address 00000002
[ 484.736496] pgd = ffff0000094a2000
[ 484.739885] [00000002] *pgd=00000047fcffe003, *pud=00000047fcffd003, *pmd=0000000000000000
[ 484.748158] Internal error: Oops: 96000005 [#1 ] SMP
[...]
[ 485.101451] Call trace:
[...]
[ 485.188473] [<ffff000000a46e68>] msg_done_handler+0x668/0x700 [ipmi_ssif]
[ 485.195249] [<ffff000000a456b8>] ipmi_ssif_thread+0x110/0x128 [ipmi_ssif]
[ 485.202038] [<ffff0000080f1430>] kthread+0x108/0x138
[ 485.206994] [<ffff0000080838e0>] ret_from_fork+0x10/0x30
[ 485.212294] Code: aa1903e1 aa1803e0 b900227f 95fef6a5 (39400aa3)
Adding a check to validate the data len before printing data[2] to fix this issue.
Signed-off-by: Kamlakant Patel <kamlakant.patel@cavium.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:50:46 +02:00
..
2018-03-22 09:17:57 +01:00
2018-02-22 15:43:55 +01:00
2018-05-30 07:50:46 +02:00
2016-08-31 14:22:49 +02:00
2017-06-07 12:07:48 +02:00
2018-03-24 11:00:08 +01:00
2015-06-12 16:58:33 -07:00
2016-08-31 14:47:54 +02:00
2016-08-31 14:12:35 +02:00
2016-07-14 16:21:53 +09:00
2015-09-20 19:32:35 -07:00
2015-12-09 13:00:45 -05:00
2016-02-17 09:39:56 +01:00
2017-04-21 09:31:22 +02:00
2017-05-25 15:44:30 +02:00
2016-08-05 09:48:22 -04:00
2015-12-09 13:00:45 -05:00
2017-06-14 15:06:04 +02:00
2015-08-05 10:35:49 -07:00
2016-01-22 17:02:18 -08:00
2016-02-08 14:57:30 -08:00
2016-02-09 17:39:56 -08:00
2015-12-23 10:41:31 -05:00
2016-06-29 17:33:46 +10:00
2017-04-12 12:41:10 +02:00
2016-01-22 18:04:28 -05:00
2018-05-01 15:13:04 -07:00
2016-02-08 14:57:30 -08:00
2016-08-31 14:47:54 +02:00
2016-09-27 21:06:22 -04:00
2016-10-05 18:36:18 -04:00
2016-08-30 14:45:50 +02:00
2015-08-05 17:26:00 -07:00
2016-09-13 17:30:17 +02:00
2018-05-01 15:13:05 -07:00