Adrian Hunter
7c7cfdcf7f
scsi: ufs: Fix NULL pointer dereference in ufshcd_config_vreg_hpm()
...
Fix the following BUG:
[ 187.065689] BUG: kernel NULL pointer dereference, address: 000000000000001c
[ 187.065790] RIP: 0010:ufshcd_vreg_set_hpm+0x3c/0x110 [ufshcd_core]
[ 187.065938] Call Trace:
[ 187.065959] ufshcd_resume+0x72/0x290 [ufshcd_core]
[ 187.065980] ufshcd_system_resume+0x54/0x140 [ufshcd_core]
[ 187.065993] ? pci_pm_restore+0xb0/0xb0
[ 187.066005] ufshcd_pci_resume+0x15/0x20 [ufshcd_pci]
[ 187.066017] pci_pm_thaw+0x4c/0x90
[ 187.066030] dpm_run_callback+0x5b/0x150
[ 187.066043] device_resume+0x11b/0x220
Voltage regulators are optional, so functions must check they exist
before dereferencing.
Note this issue is hidden if CONFIG_REGULATORS is not set, because the
offending code is optimised away.
Notes for stable:
The issue first appears in commit 57d104c153
("ufs: add UFS power
management support") but is inadvertently fixed in commit 60f0187031
("scsi: ufs: disable vccq if it's not needed by UFS device") which in
turn was reverted by commit 730679817d
("Revert "scsi: ufs: disable vccq
if it's not needed by UFS device""). So fix applies v3.18 to v4.5 and
v5.1+
Fixes: 57d104c153
("ufs: add UFS power management support")
Fixes: 730679817d
("Revert "scsi: ufs: disable vccq if it's not needed by UFS device"")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2019-08-14 22:03:21 -04:00
..
2019-05-21 11:28:46 +02:00
2019-07-11 15:14:01 -07:00
2019-07-11 15:14:01 -07:00
2019-05-21 10:50:46 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:07 +02:00
2019-06-05 17:36:38 +02:00
2019-07-11 15:14:01 -07:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-07-11 15:14:01 -07:00
2019-07-19 10:42:02 -07:00
2019-07-23 22:20:02 -04:00
2019-05-30 11:26:32 -07:00
2019-05-21 10:50:46 +02:00
2019-07-29 21:13:27 -04:00
2019-01-29 01:16:09 -05:00
2019-07-11 15:14:01 -07:00
2019-07-23 22:18:14 -04:00
2019-05-30 11:26:37 -07:00
2019-06-20 15:37:02 -04:00
2019-07-29 21:12:35 -04:00
2019-07-20 10:04:58 -07:00
2019-08-07 21:56:41 -04:00
2019-07-23 22:14:06 -04:00
2019-07-30 12:46:06 -04:00
2019-07-11 15:14:01 -07:00
2019-07-11 15:17:41 -07:00
2019-07-11 20:35:21 -04:00
2019-06-17 20:20:36 -07:00
2019-06-27 21:06:39 -07:00
2019-08-14 21:50:51 -04:00
2019-05-21 10:50:46 +02:00
2019-06-04 22:22:29 -04:00
2019-01-29 00:40:54 -05:00
2019-05-30 11:26:35 -07:00
2019-08-14 22:03:21 -04:00
2019-02-25 21:37:25 -05:00
2019-03-02 11:39:54 -08:00
2018-12-19 21:54:07 -05:00
2018-10-17 21:58:51 -04:00
2019-05-24 17:36:45 +02:00
2018-08-30 07:27:22 -04:00
2019-01-08 07:58:37 -05:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-07-11 15:17:41 -07:00
2019-07-11 15:17:41 -07:00
2019-05-21 10:50:45 +02:00
2018-12-18 23:13:12 -05:00
2019-05-21 10:50:45 +02:00
2019-01-22 10:21:43 +01:00
2019-05-21 10:50:45 +02:00
2019-06-05 17:37:11 +02:00
2019-06-05 17:37:11 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2018-12-18 23:19:21 -05:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-07-11 15:17:41 -07:00
2019-06-20 15:21:33 -04:00
2019-06-18 19:46:22 -04:00
2019-06-18 19:46:18 -04:00
2019-06-18 19:46:23 -04:00
2019-06-18 19:46:22 -04:00
2018-09-25 20:45:53 -04:00
2019-05-21 10:50:45 +02:00
2019-01-08 21:58:35 -05:00
2019-01-08 21:58:35 -05:00
2019-01-08 21:57:42 -05:00
2019-05-30 11:25:18 -07:00
2019-01-08 21:58:35 -05:00
2019-05-21 10:50:45 +02:00
2019-07-20 10:04:58 -07:00
2019-07-11 15:14:01 -07:00
2019-07-30 12:40:36 -04:00
2019-06-18 19:46:18 -04:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:36:37 +02:00
2019-07-11 15:17:41 -07:00
2019-05-21 11:28:46 +02:00
2019-07-11 15:17:41 -07:00
2019-05-30 11:26:35 -07:00
2018-12-18 23:19:21 -05:00
2018-11-06 21:31:28 -05:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:37 -07:00
2019-05-21 10:50:45 +02:00
2019-07-22 22:05:48 -04:00
2019-05-24 17:36:45 +02:00
2019-07-11 15:14:01 -07:00
2019-05-30 11:26:35 -07:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-07-11 15:14:01 -07:00
2019-07-17 22:39:27 +09:00
2019-05-30 11:26:32 -07:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2018-12-18 23:13:12 -05:00
2019-07-11 15:17:41 -07:00
2019-05-30 11:26:39 -07:00
2018-12-28 14:48:06 -08:00
2018-10-17 21:06:49 -04:00
2019-05-20 10:56:43 -04:00
2018-10-17 21:07:54 -04:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2019-07-11 15:17:41 -07:00
2019-06-20 15:37:02 -04:00
2019-05-24 17:39:02 +02:00
2019-05-24 17:39:02 +02:00
2019-07-11 15:17:41 -07:00
2019-05-30 11:26:35 -07:00
2019-06-20 15:21:33 -04:00
2019-05-30 11:26:38 -07:00
2019-05-24 17:39:02 +02:00
2019-05-24 17:39:02 +02:00
2019-03-19 17:11:37 -04:00
2018-12-18 23:19:21 -05:00
2019-05-21 10:50:45 +02:00
2019-02-13 22:07:03 -05:00
2019-06-05 17:37:17 +02:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:27:12 +02:00
2019-05-21 06:16:21 -04:00
2019-07-11 20:39:22 -04:00
2019-05-30 11:26:35 -07:00
2019-07-11 15:14:01 -07:00
2019-05-21 06:16:21 -04:00
2019-07-22 22:05:48 -04:00
2019-06-05 17:37:16 +02:00
2019-05-30 11:26:35 -07:00
2019-07-11 15:14:01 -07:00
2019-06-18 19:46:17 -04:00
2019-06-24 05:22:31 +02:00
2019-04-15 22:25:00 -04:00
2019-05-30 11:29:53 -07:00
2019-07-11 15:14:01 -07:00
2019-06-05 17:37:07 +02:00
2019-07-11 15:14:01 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:29:53 -07:00
2019-05-30 11:26:35 -07:00
2019-06-19 17:09:56 +02:00
2019-07-11 15:14:01 -07:00
2019-06-05 17:37:14 +02:00
2019-07-20 10:04:58 -07:00
2019-07-11 15:14:01 -07:00
2019-07-11 20:04:37 -06:00
2019-07-11 15:14:01 -07:00
2019-05-24 17:27:12 +02:00
2018-12-18 23:19:21 -05:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2018-08-02 15:22:13 -06:00
2019-05-21 06:16:23 -04:00
2019-07-11 15:14:01 -07:00
2019-05-30 11:26:32 -07:00
2019-07-20 10:04:58 -07:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-07-17 11:26:09 -07:00
2019-07-11 15:17:41 -07:00
2019-07-11 15:17:41 -07:00
2019-05-24 17:39:02 +02:00
2019-07-11 15:14:01 -07:00
2018-11-15 14:27:08 -05:00
2018-12-18 23:13:12 -05:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2018-10-17 21:38:20 -04:00