Matt Lupfer
0cd2dd4bcf
scsi: mpt3sas: Page fault in reply q processing
...
commit 69ad4ef868c1fc7609daa235dfa46d28ba7a3ba3 upstream.
A page fault was encountered in mpt3sas on a LUN reset error path:
[ 145.763216] mpt3sas_cm1: Task abort tm failed: handle(0x0002),timeout(30) tr_method(0x0) smid(3) msix_index(0)
[ 145.778932] scsi 1:0:0:0: task abort: FAILED scmd(0x0000000024ba29a2)
[ 145.817307] scsi 1:0:0:0: attempting device reset! scmd(0x0000000024ba29a2)
[ 145.827253] scsi 1:0:0:0: [sg1] tag#2 CDB: Receive Diagnostic 1c 01 01 ff fc 00
[ 145.837617] scsi target1:0:0: handle(0x0002), sas_address(0x500605b0000272b9), phy(0)
[ 145.848598] scsi target1:0:0: enclosure logical id(0x500605b0000272b8), slot(0)
[ 149.858378] mpt3sas_cm1: Poll ReplyDescriptor queues for completion of smid(0), task_type(0x05), handle(0x0002)
[ 149.875202] BUG: unable to handle page fault for address: 00000007fffc445d
[ 149.885617] #PF: supervisor read access in kernel mode
[ 149.894346] #PF: error_code(0x0000) - not-present page
[ 149.903123] PGD 0 P4D 0
[ 149.909387] Oops: 0000 [#1 ] PREEMPT SMP NOPTI
[ 149.917417] CPU: 24 PID: 3512 Comm: scsi_eh_1 Kdump: loaded Tainted: G S O 5.10.89-altav-1 #1
[ 149.934327] Hardware name: DDN 200NVX2 /200NVX2-MB , BIOS ATHG2.2.02.01 09/10/2021
[ 149.951871] RIP: 0010:_base_process_reply_queue+0x4b/0x900 [mpt3sas]
[ 149.961889] Code: 0f 84 22 02 00 00 8d 48 01 49 89 fd 48 8d 57 38 f0 0f b1 4f 38 0f 85 d8 01 00 00 49 8b 45 10 45 31 e4 41 8b 55 0c 48 8d 1c d0 <0f> b6 03 83 e0 0f 3c 0f 0f 85 a2 00 00 00 e9 e6 01 00 00 0f b7 ee
[ 149.991952] RSP: 0018:ffffc9000f1ebcb8 EFLAGS: 00010246
[ 150.000937] RAX: 0000000000000055 RBX: 00000007fffc445d RCX: 000000002548f071
[ 150.011841] RDX: 00000000ffff8881 RSI: 0000000000000001 RDI: ffff888125ed50d8
[ 150.022670] RBP: 0000000000000000 R08: 0000000000000000 R09: c0000000ffff7fff
[ 150.033445] R10: ffffc9000f1ebb68 R11: ffffc9000f1ebb60 R12: 0000000000000000
[ 150.044204] R13: ffff888125ed50d8 R14: 0000000000000080 R15: 34cdc00034cdea80
[ 150.054963] FS: 0000000000000000(0000) GS:ffff88dfaf200000(0000) knlGS:0000000000000000
[ 150.066715] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 150.076078] CR2: 00000007fffc445d CR3: 000000012448a006 CR4: 0000000000770ee0
[ 150.086887] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 150.097670] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 150.108323] PKRU: 55555554
[ 150.114690] Call Trace:
[ 150.120497] ? printk+0x48/0x4a
[ 150.127049] mpt3sas_scsih_issue_tm.cold.114+0x2e/0x2b3 [mpt3sas]
[ 150.136453] mpt3sas_scsih_issue_locked_tm+0x86/0xb0 [mpt3sas]
[ 150.145759] scsih_dev_reset+0xea/0x300 [mpt3sas]
[ 150.153891] scsi_eh_ready_devs+0x541/0x9e0 [scsi_mod]
[ 150.162206] ? __scsi_host_match+0x20/0x20 [scsi_mod]
[ 150.170406] ? scsi_try_target_reset+0x90/0x90 [scsi_mod]
[ 150.178925] ? blk_mq_tagset_busy_iter+0x45/0x60
[ 150.186638] ? scsi_try_target_reset+0x90/0x90 [scsi_mod]
[ 150.195087] scsi_error_handler+0x3a5/0x4a0 [scsi_mod]
[ 150.203206] ? __schedule+0x1e9/0x610
[ 150.209783] ? scsi_eh_get_sense+0x210/0x210 [scsi_mod]
[ 150.217924] kthread+0x12e/0x150
[ 150.224041] ? kthread_worker_fn+0x130/0x130
[ 150.231206] ret_from_fork+0x1f/0x30
This is caused by mpt3sas_base_sync_reply_irqs() using an invalid reply_q
pointer outside of the list_for_each_entry() loop. At the end of the full
list traversal the pointer is invalid.
Move the _base_process_reply_queue() call inside of the loop.
Link: https://lore.kernel.org/r/d625deae-a958-0ace-2ba3-0888dd0a415b@ddn.com
Fixes: 711a923c14d9 ("scsi: mpt3sas: Postprocessing of target and LUN reset")
Cc: stable@vger.kernel.org
Acked-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Matt Lupfer <mlupfer@ddn.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-23 09:16:43 +01:00
..
2021-08-11 22:25:38 -04:00
2021-07-11 10:59:53 -07:00
2021-07-11 10:59:53 -07:00
2021-06-18 23:26:33 -04:00
2021-10-04 21:54:18 -04:00
2021-07-18 21:19:14 -04:00
2021-05-21 17:01:18 -04:00
2022-02-08 18:34:11 +01:00
2021-08-11 22:25:38 -04:00
2021-11-18 19:16:52 +01:00
2021-08-13 17:49:05 -07:00
2021-09-07 19:13:42 -07:00
2021-07-29 21:58:35 -04:00
2020-03-11 23:07:59 -04:00
2022-02-01 17:27:07 +01:00
2021-06-02 01:37:04 -04:00
2021-06-07 21:30:09 -04:00
2021-08-16 13:33:24 -04:00
2021-08-11 22:25:39 -04:00
2021-10-20 22:59:45 -04:00
2021-06-10 13:09:16 +01:00
2021-08-11 22:25:43 -04:00
2021-06-28 22:31:16 -04:00
2021-08-11 22:25:39 -04:00
2022-02-23 12:03:20 +01:00
2021-11-18 19:16:50 +01:00
2022-01-27 11:05:03 +01:00
2022-03-23 09:16:43 +01:00
2021-06-22 23:00:02 -04:00
2021-08-09 23:30:25 -04:00
2022-02-23 12:03:06 +01:00
2022-02-16 12:56:13 +01:00
2022-02-23 12:03:22 +01:00
2021-12-14 10:57:12 +01:00
2021-08-11 22:25:41 -04:00
2021-11-25 09:48:27 +01:00
2021-08-24 22:56:32 -04:00
2021-08-11 22:25:42 -04:00
2022-02-23 12:03:15 +01:00
2020-03-25 11:50:48 +01:00
2021-05-31 23:59:18 -04:00
2021-05-15 18:01:34 -04:00
2021-03-18 22:18:09 -04:00
2021-01-22 21:14:08 -05:00
2021-05-31 23:59:18 -04:00
2021-01-22 21:14:07 -05:00
2021-08-11 22:25:38 -04:00
2021-05-07 00:26:34 -07:00
2021-03-29 23:33:06 -04:00
2020-06-09 09:39:13 -07:00
2020-06-09 09:39:13 -07:00
2021-11-25 09:48:27 +01:00
2021-05-31 22:48:23 -04:00
2021-08-11 22:25:38 -04:00
2021-01-13 00:14:07 -05:00
2021-06-18 23:27:04 -04:00
2020-11-23 22:12:09 -05:00
2021-03-15 22:29:00 -04:00
2021-01-22 21:14:08 -05:00
2021-08-01 13:27:46 -04:00
2021-05-14 22:19:04 -04:00
2021-07-28 22:24:25 -04:00
2021-06-02 23:09:39 -04:00
2021-11-18 19:16:48 +01:00
2021-01-22 21:14:10 -05:00
2021-08-11 22:25:38 -04:00
2020-03-11 23:07:59 -04:00
2021-05-31 22:48:21 -04:00
2019-12-19 22:08:51 -05:00
2021-01-26 07:42:27 +01:00
2021-05-31 22:48:24 -04:00
2020-07-08 01:12:44 -04:00
2021-06-02 01:37:04 -04:00
2021-01-26 07:42:27 +01:00
2020-06-09 09:39:13 -07:00
2021-11-18 19:15:51 +01:00
2021-04-01 22:52:40 -04:00
2021-08-11 22:25:39 -04:00
2020-09-02 22:49:06 -04:00
2021-05-31 22:48:21 -04:00
2021-06-18 23:01:03 -04:00
2021-03-18 23:35:55 -04:00
2021-01-22 21:14:10 -05:00
2021-06-29 16:46:08 -04:00
2021-06-29 16:46:08 -04:00
2021-08-11 22:25:39 -04:00
2021-05-07 00:26:34 -07:00
2020-06-02 21:23:47 -04:00
2021-06-02 01:28:20 -04:00
2021-04-13 00:20:48 -04:00
2021-07-28 22:24:27 -04:00
2021-08-30 10:18:25 +02:00
2021-02-08 22:39:03 -05:00
2022-01-11 15:35:17 +01:00
2021-03-24 22:16:12 -04:00
2020-10-02 21:52:53 -04:00
2020-12-07 20:24:09 -05:00
2021-08-23 23:07:05 -04:00
2021-05-31 23:59:18 -04:00
2021-05-31 22:48:23 -04:00
2020-06-09 09:39:13 -07:00
2021-08-11 22:25:40 -04:00
2020-03-11 23:07:56 -04:00
2021-08-11 22:25:40 -04:00
2020-01-02 21:57:44 -05:00
2022-02-16 12:56:14 +01:00
2020-01-02 21:57:44 -05:00
2021-09-13 22:15:47 -04:00
2021-01-22 21:14:12 -05:00
2021-08-11 22:25:38 -04:00
2020-12-07 20:24:09 -05:00
2021-05-31 22:48:23 -04:00
2021-03-18 23:35:55 -04:00
2021-05-21 16:59:33 -04:00
2021-06-18 23:01:03 -04:00
2021-05-31 22:48:21 -04:00
2021-08-23 23:06:56 -04:00
2020-01-15 23:09:11 -05:00
2021-05-31 22:48:23 -04:00
2021-08-11 22:25:41 -04:00
2021-08-01 13:21:40 -04:00
2021-07-28 22:24:27 -04:00
2021-12-22 09:32:51 +01:00
2022-01-27 11:05:22 +01:00
2021-07-21 23:49:02 -04:00
2021-03-24 23:03:43 -04:00
2021-11-18 19:15:51 +01:00
2021-11-18 19:15:51 +01:00
2021-11-25 09:48:26 +01:00
2021-08-11 22:25:37 -04:00
2019-12-19 22:08:54 -05:00
2022-01-27 11:04:15 +01:00
2021-07-30 22:22:36 -04:00
2020-02-04 03:05:26 +00:00
2022-02-23 12:03:06 +01:00
2021-12-01 09:04:50 +01:00
2020-03-16 22:08:36 -04:00
2021-08-11 22:25:37 -04:00
2021-12-08 09:04:39 +01:00
2021-05-31 22:48:20 -04:00
2021-08-11 22:25:37 -04:00
2021-04-05 23:14:53 -04:00
2022-01-27 11:04:10 +01:00
2021-05-06 19:24:11 -07:00
2021-09-21 23:52:55 -04:00
2022-03-16 14:23:46 +01:00
2020-10-14 15:15:35 -07:00
2020-09-15 20:28:06 -04:00
2021-09-28 22:42:06 -04:00
2022-03-16 14:23:46 +01:00
2020-09-25 06:20:44 +02:00
2021-03-18 22:52:29 -04:00
2021-05-07 00:26:34 -07:00
2021-09-13 22:15:49 -04:00
2022-01-27 11:05:03 +01:00
2022-03-16 14:23:46 +01:00
2020-02-24 15:01:57 -05:00
2022-03-16 14:23:46 +01:00
2021-08-23 12:54:30 -06:00
2021-08-11 22:25:41 -04:00
2021-10-12 21:59:50 -04:00
2021-08-11 22:25:41 -04:00
2021-04-13 00:20:48 -04:00
2020-10-02 21:52:55 -04:00
2021-09-28 22:47:28 -04:00
2022-01-05 12:42:39 +01:00
2021-03-04 17:21:25 -05:00
2021-05-31 22:48:23 -04:00
2021-08-16 13:33:24 -04:00
2022-03-11 12:22:36 +01:00
2021-08-30 10:18:25 +02:00
2020-06-09 09:39:13 -07:00