Sergey Shtylyov
1ac5efee33
ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()
...
[ Upstream commit bf476fe22aa1851bab4728e0c49025a6a0bea307 ]
In an unlikely (and probably wrong?) case that the 'ppi' parameter of
ata_host_alloc_pinfo() points to an array starting with a NULL pointer,
there's going to be a kernel oops as the 'pi' local variable won't get
reassigned from the initial value of NULL. Initialize 'pi' instead to
'&ata_dummy_port_info' to fix the possible kernel oops for good...
Found by Linux Verification Center (linuxtesting.org) with the SVACE static
analysis tool.
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-25 11:46:42 +02:00
..
2020-10-01 13:12:52 +02:00
2021-03-03 18:22:43 +01:00
2017-08-16 07:38:27 -07:00
2017-03-24 11:40:03 -04:00
2017-01-15 18:51:12 -05:00
2017-08-28 10:54:42 -07:00
2018-06-21 04:02:49 +09:00
2017-03-06 15:40:59 -05:00
2017-08-04 13:34:14 -07:00
2018-06-21 04:02:49 +09:00
2016-06-15 14:26:41 -04:00
2016-08-10 12:16:49 -04:00
2021-07-20 16:17:46 +02:00
2018-06-21 04:02:49 +09:00
2020-02-28 16:36:16 +01:00
2018-06-21 04:02:49 +09:00
2017-09-18 20:32:02 -07:00
2019-11-24 08:22:54 +01:00
2021-05-22 10:57:31 +02:00
2020-10-01 13:12:52 +02:00
2022-06-25 11:46:42 +02:00
2021-11-26 11:40:20 +01:00
2020-04-24 08:00:45 +02:00
2021-12-22 09:18:00 +01:00
2021-08-15 13:03:32 +02:00
2016-05-09 12:36:46 -04:00
2022-06-14 16:54:01 +02:00
2017-11-02 11:10:55 +01:00
2019-08-25 10:50:12 +02:00
2017-06-05 15:29:21 -04:00
2017-11-02 11:10:55 +01:00
2017-08-11 10:35:07 -07:00
2021-05-22 10:57:30 +02:00
2017-03-27 13:52:00 -04:00
2017-05-30 11:54:36 -04:00
2017-03-30 16:13:04 +05:30
2017-08-11 10:35:07 -07:00
2021-07-20 16:17:34 +02:00
2017-02-21 17:21:32 -08:00
2018-10-03 17:00:59 -07:00
2022-03-08 19:01:56 +01:00
2016-07-12 11:02:05 -04:00
2016-04-15 16:53:14 -04:00
2016-11-09 11:48:58 -05:00
2021-05-22 10:57:30 +02:00
2021-10-20 10:42:05 +02:00
2020-10-01 13:12:52 +02:00
2022-04-27 13:15:30 +02:00
2017-03-06 15:18:01 -05:00
2016-08-30 11:59:47 -04:00
2022-06-14 16:53:58 +02:00
2017-03-06 15:18:01 -05:00
2017-01-10 11:11:17 -05:00
2017-05-16 11:25:59 -04:00
2020-10-01 13:12:52 +02:00
2021-07-20 16:17:34 +02:00
2017-06-12 14:06:34 -04:00
2017-05-30 11:54:37 -04:00
2017-06-12 14:06:34 -04:00
2020-10-01 13:12:52 +02:00
2021-09-22 11:45:29 +02:00
2021-12-08 08:46:54 +01:00
2017-08-11 10:32:09 -07:00
2017-11-02 11:10:55 +01:00
2021-07-20 16:17:34 +02:00
2020-10-01 13:12:52 +02:00
2021-11-02 18:25:11 +01:00
2020-10-01 13:12:52 +02:00
2020-10-01 13:12:52 +02:00
2017-05-16 11:25:59 -04:00
2020-10-01 13:12:52 +02:00
2020-11-05 11:06:52 +01:00
2020-10-01 13:12:52 +02:00
2020-10-01 13:12:52 +02:00
2017-05-16 11:25:59 -04:00
2017-07-18 18:02:36 -04:00
2020-10-01 13:12:52 +02:00
2017-05-16 11:25:59 -04:00
2017-06-26 16:54:53 -04:00
2017-05-16 11:25:59 -04:00
2017-11-02 11:10:55 +01:00