Quinn Tran
084292de35
scsi: qla2xxx: Fix gnl list corruption
[ Upstream commit c98c5daaa2 ]
Current code does list element deletion and addition in and out of lock
protection. This patch moves deletion behind lock.
list_add double add: new=ffff9130b5eb89f8, prev=ffff9130b5eb89f8,
next=ffff9130c6a715f0.
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:31!
invalid opcode: 0000 [#1] SMP PTI
CPU: 1 PID: 182395 Comm: kworker/1:37 Kdump: loaded Tainted: G W OE
--------- - - 4.18.0-193.el8.x86_64 #1
Hardware name: HP ProLiant DL160 Gen8, BIOS J03 02/10/2014
Workqueue: qla2xxx_wq qla2x00_iocb_work_fn [qla2xxx]
RIP: 0010:__list_add_valid+0x41/0x50
Code: 85 94 00 00 00 48 39 c7 74 0b 48 39 d7 74 06 b8 01 00 00 00 c3 48 89 f2
4c 89 c1 48 89 fe 48 c7 c7 60 83 ad 97 e8 4d bd ce ff <0f> 0b 0f 1f 00 66 2e
0f 1f 84 00 00 00 00 00 48 8b 07 48 8b 57 08
RSP: 0018:ffffaba306f47d68 EFLAGS: 00010046
RAX: 0000000000000058 RBX: ffff9130b5eb8800 RCX: 0000000000000006
RDX: 0000000000000000 RSI: 0000000000000096 RDI: ffff9130b7456a00
RBP: ffff9130c6a70a58 R08: 000000000008d7be R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000001 R12: ffff9130c6a715f0
R13: ffff9130b5eb8824 R14: ffff9130b5eb89f8 R15: ffff9130b5eb89f8
FS: 0000000000000000(0000) GS:ffff9130b7440000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007efcaaef11a0 CR3: 000000005200a002 CR4: 00000000000606e0
Call Trace:
qla24xx_async_gnl+0x113/0x3c0 [qla2xxx]
? qla2x00_iocb_work_fn+0x53/0x80 [qla2xxx]
? process_one_work+0x1a7/0x3b0
? worker_thread+0x30/0x390
? create_worker+0x1a0/0x1a0
? kthread+0x112/0x130
Link: https://lore.kernel.org/r/20211026115412.27691-3-njavali@marvell.com
Fixes: 726b854870 ("qla2xxx: Add framework for async fabric discovery")
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-26 11:36:15 +01:00
..
2021-11-26 11:36:05 +01:00
2021-11-06 13:58:45 +01:00
2021-11-26 11:35:56 +01:00
2021-11-26 11:36:01 +01:00
2021-07-20 16:16:01 +02:00
2021-11-26 11:36:15 +01:00
2021-11-02 18:26:45 +01:00
2021-09-22 11:47:55 +02:00
2021-09-22 11:47:46 +02:00
2021-07-20 16:16:03 +02:00
2021-05-22 10:59:29 +02:00
2021-05-26 11:48:34 +02:00
2021-11-26 11:36:09 +01:00
2021-09-22 11:47:57 +02:00
2021-11-26 11:36:10 +01:00
2021-10-06 15:31:21 +02:00
2021-11-26 11:36:08 +01:00
2021-11-26 11:36:08 +01:00
2021-11-26 11:36:15 +01:00
2021-07-28 11:13:45 +02:00
2021-11-26 11:36:00 +01:00
2021-07-20 16:15:57 +02:00
2021-04-07 12:48:50 +02:00
2021-11-26 11:35:57 +01:00
2021-10-06 15:31:14 +02:00
2021-07-20 16:15:55 +02:00
2021-10-06 15:31:13 +02:00
2021-11-26 11:36:14 +01:00
2021-10-17 10:19:48 +02:00
2021-05-22 10:59:34 +02:00
2021-11-26 11:35:59 +01:00
2021-11-26 11:36:09 +01:00
2021-07-20 16:16:10 +02:00
2021-10-13 10:10:52 +02:00
2021-03-11 14:04:59 +01:00
2021-11-26 11:36:03 +01:00
2021-11-26 11:36:13 +01:00
2021-11-26 11:35:57 +01:00
2021-08-26 08:36:42 -04:00
2021-10-06 15:31:25 +02:00
2021-11-26 11:36:12 +01:00
2021-10-27 09:53:15 +02:00
2021-07-20 16:15:57 +02:00
2021-10-06 15:31:12 +02:00
2021-10-06 15:31:15 +02:00
2021-11-26 11:36:08 +01:00
2021-11-26 11:36:13 +01:00
2021-11-26 11:36:09 +01:00
2021-09-22 11:48:13 +02:00
2021-10-20 11:23:02 +02:00
2021-11-26 11:36:10 +01:00
2021-11-26 11:36:14 +01:00
2021-11-26 11:36:11 +01:00
2021-11-02 18:26:44 +01:00
2021-09-22 11:48:13 +02:00
2021-03-11 14:04:59 +01:00
2021-11-26 11:36:10 +01:00
2021-10-20 11:23:02 +02:00
2021-09-22 11:48:07 +02:00
2021-09-03 09:58:01 +02:00
2021-09-26 13:39:48 +02:00
2021-09-22 11:48:08 +02:00
2021-11-26 11:36:14 +01:00
2021-08-12 13:19:43 +02:00
2021-05-22 10:59:15 +02:00
2021-11-26 11:36:13 +01:00
2021-11-26 11:36:03 +01:00
2021-11-26 11:36:10 +01:00
2021-11-26 11:36:14 +01:00
2021-10-13 10:10:51 +02:00
2021-09-26 13:39:49 +02:00
2021-05-26 11:48:33 +02:00
2021-11-26 11:36:00 +01:00
2021-07-28 11:13:42 +02:00
2021-05-22 10:59:42 +02:00
2021-09-22 11:47:57 +02:00
2021-09-22 11:47:50 +02:00
2021-11-26 11:36:15 +01:00
2021-08-26 08:36:48 -04:00
2021-11-26 11:36:12 +01:00
2021-05-22 10:59:30 +02:00
2021-11-26 11:36:07 +01:00
2021-07-20 16:15:50 +02:00
2021-11-12 14:40:52 +01:00
2021-07-28 11:13:48 +02:00
2021-08-12 13:19:42 +02:00
2021-10-06 15:31:15 +02:00
2021-06-03 08:38:04 +02:00
2021-11-26 11:36:13 +01:00
2021-11-26 11:36:13 +01:00
2021-09-22 11:48:01 +02:00
2021-09-03 09:58:02 +02:00
2021-11-26 11:36:13 +01:00
2021-10-20 11:23:02 +02:00
2021-07-20 16:15:55 +02:00
2021-07-20 16:16:07 +02:00
2021-11-26 11:36:15 +01:00
2021-11-26 11:36:02 +01:00