linux_dsm_epyc7002/drivers/scsi/qedi
Manish Rangankar d5632b11f0 scsi: qedi: Check for session online before getting iSCSI TLV data.
The kernel panic was observed after switch side perturbation,

BUG: unable to handle kernel NULL pointer dereference at (null)
     IP: [<ffffffff8132b5a0>] strcmp+0x20/0x40
     PGD 0 Oops: 0000 [#1] SMP
CPU: 8 PID: 647 Comm: kworker/8:1 Tainted: G        W  OE  ------------   3.10.0-693.el7.x86_64 #1
Hardware name: HPE ProLiant DL380 Gen10/ProLiant DL380 Gen10, BIOS U30 06/20/2018
Workqueue: slowpath-13:00. qed_slowpath_task [qed]
task: ffff880429eb8fd0 ti: ffff880429190000 task.ti: ffff880429190000
RIP: 0010:[<ffffffff8132b5a0>]  [<ffffffff8132b5a0>] strcmp+0x20/0x40
RSP: 0018:ffff880429193c68  EFLAGS: 00010202
RAX: 000000000000000a RBX: 0000000000000002 RCX: 0000000000000000
RDX: 0000000000000001 RSI: 0000000000000001 RDI: ffff88042bda7a41
RBP: ffff880429193c68 R08: 000000000000ffff R09: 000000000000ffff
R10: 0000000000000007 R11: ffff88042b3af338 R12: ffff880420b007a0
R13: ffff88081aa56af8 R14: 0000000000000001 R15: ffff88081aa50410
FS:  0000000000000000(0000) GS:ffff88042fe00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000000019f2000 CR4: 00000000003407e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
ffff880429193d20 ffffffffc02a0c90 ffffc90004b32000 ffff8803fd3ec600
ffff88042bda7800 ffff88042bda7a00 ffff88042bda7840 ffff88042bda7a40
0000000129193d10 2e3836312e323931 ff000a342e363232 ffffffffc01ad99d
Call Trace:
[<ffffffffc02a0c90>] qedi_get_protocol_tlv_data+0x270/0x470 [qedi]
[<ffffffffc01ad99d>] ? qed_mfw_process_tlv_req+0x24d/0xbf0 [qed]
[<ffffffffc01653ae>] qed_mfw_fill_tlv_data+0x5e/0xd0 [qed]
[<ffffffffc01ad9b9>] qed_mfw_process_tlv_req+0x269/0xbf0 [qed]

Fix kernel NULL pointer deref by checking for session is online before
getting iSCSI TLV data.

Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-11-28 20:51:47 -05:00
..
Kconfig qed: Fix iWARP out of order flow 2017-10-19 12:46:43 +01:00
Makefile qed*: Utilize Firmware 8.15.3.0 2017-03-13 15:33:09 -07:00
qedi_dbg.c scsi: qedi: return via va_end to match corresponding va_start 2017-01-05 00:31:13 -05:00
qedi_dbg.h scsi: qedi: fix build regression 2018-02-27 21:19:13 -05:00
qedi_debugfs.c scsi: qedi: fix building with LTO 2018-02-13 21:37:00 -05:00
qedi_fw_api.c scsi: qedi: Fix misleading indentation 2018-06-26 12:30:11 -04:00
qedi_fw_iscsi.h qed*: HSI renaming for different types of HW 2018-01-02 13:59:15 -05:00
qedi_fw_scsi.h qed*: Utilize Firmware 8.15.3.0 2017-03-13 15:33:09 -07:00
qedi_fw.c Merge branch 'fixes' into misc 2018-04-03 17:38:39 -07:00
qedi_gbl.h scsi: qedi: fix building with LTO 2018-02-13 21:37:00 -05:00
qedi_hsi.h
qedi_iscsi.c qed*: Utilize FW 8.37.2.0 2018-06-05 10:48:09 -04:00
qedi_iscsi.h qedi: Add support for populating ethernet TLVs. 2018-05-22 23:29:54 -04:00
qedi_main.c scsi: qedi: Check for session online before getting iSCSI TLV data. 2018-11-28 20:51:47 -05:00
qedi_nvm_iscsi_cfg.h scsi: qedi: Add support for Boot from SAN over iSCSI offload 2017-07-12 16:52:27 -04:00
qedi_sysfs.c
qedi_version.h qed*: Advance drivers' version to 8.33.0.20 2018-01-02 13:59:16 -05:00
qedi.h scsi: qedi: Fix spelling mistake "OUSTANDING" -> "OUTSTANDING" 2018-11-28 20:51:47 -05:00