diff options
author | manish.rangankar@cavium.com <manish.rangankar@cavium.com> | 2017-05-19 11:33:18 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-05-24 05:16:43 +0300 |
commit | 0ea9314f4e6c69f8d732e0a9310114c2de35ada8 (patch) | |
tree | 69c0eed8526a5eeb6de591fef87e8019e54a937e /drivers/scsi/qedi | |
parent | d0788a528d9e09d7c17f05dd61c4cc492181f817 (diff) | |
download | linux-0ea9314f4e6c69f8d732e0a9310114c2de35ada8.tar.xz |
scsi: qedi: Fix endpoint NULL panic in qedi_set_path.
RIP: 0010:qedi_set_path+0x114/0x570 [qedi]
Call Trace:
[<ffffffffa0472923>] iscsi_if_recv_msg+0x623/0x14a0
[<ffffffff81307de6>] ? rhashtable_lookup_compare+0x36/0x70
[<ffffffffa047382e>] iscsi_if_rx+0x8e/0x1f0
[<ffffffff8155983d>] netlink_unicast+0xed/0x1b0
[<ffffffff81559c30>] netlink_sendmsg+0x330/0x770
[<ffffffff81510d60>] sock_sendmsg+0xb0/0xf0
[<ffffffff8101360b>] ? __switch_to+0x17b/0x4b0
[<ffffffff8163a2c8>] ? __schedule+0x2d8/0x900
[<ffffffff81511199>] ___sys_sendmsg+0x3a9/0x3c0
[<ffffffff810e2298>] ? get_futex_key+0x1c8/0x2b0
[<ffffffff810e25a0>] ? futex_wake+0x80/0x160
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedi')
-rw-r--r-- | drivers/scsi/qedi/qedi_iscsi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c index 19177931b84c..87f0af358b33 100644 --- a/drivers/scsi/qedi/qedi_iscsi.c +++ b/drivers/scsi/qedi/qedi_iscsi.c @@ -1224,8 +1224,12 @@ static int qedi_set_path(struct Scsi_Host *shost, struct iscsi_path *path_data) iscsi_cid = (u32)path_data->handle; qedi_ep = qedi->ep_tbl[iscsi_cid]; - QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_CONN, + QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_INFO, "iscsi_cid=0x%x, qedi_ep=%p\n", iscsi_cid, qedi_ep); + if (!qedi_ep) { + ret = -EINVAL; + goto set_path_exit; + } if (!is_valid_ether_addr(&path_data->mac_addr[0])) { QEDI_NOTICE(&qedi->dbg_ctx, "dst mac NOT VALID\n"); |