public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Manish Rangankar <manish.rangankar@cavium.com>
To: martin.petersen@oracle.com, lduncan@suse.com, cleech@redhat.com
Cc: linux-scsi@vger.kernel.org, QLogic-Storage-Upstream@cavium.com
Subject: [PATCH 4/7] qedi: Fix endpoint NULL panic in qedi_set_path.
Date: Fri, 19 May 2017 01:33:18 -0700	[thread overview]
Message-ID: <20170519083321.18030-5-manish.rangankar@cavium.com> (raw)
In-Reply-To: <20170519083321.18030-1-manish.rangankar@cavium.com>

 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>
---
 drivers/scsi/qedi/qedi_iscsi.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c
index 1917793..87f0af3 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");
-- 
1.8.3.1

  parent reply	other threads:[~2017-05-19  8:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-19  8:33 [PATCH 0/7]qedi: Bug fixes Manish Rangankar
2017-05-19  8:33 ` [PATCH 1/7] qedi: Fix bad pte call trace when iscsiuio is stopped Manish Rangankar
2017-05-19  8:33 ` [PATCH 2/7] qedi: Correctly set firmware max supported BDs Manish Rangankar
2017-05-19  8:33 ` [PATCH 3/7] qedi: Set dma_boundary to 0xfff Manish Rangankar
2017-05-19  8:33 ` Manish Rangankar [this message]
2017-05-19  8:33 ` [PATCH 5/7] qedi: Set firmware tcp msl timer value Manish Rangankar
2017-05-19  8:33 ` [PATCH 6/7] qedi: set max_fin_rt default value Manish Rangankar
2017-05-19  8:33 ` [PATCH 7/7] qedi: Fix endpoint NULL panic during recovery Manish Rangankar
2017-05-24  2:17 ` [PATCH 0/7]qedi: Bug fixes Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170519083321.18030-5-manish.rangankar@cavium.com \
    --to=manish.rangankar@cavium.com \
    --cc=QLogic-Storage-Upstream@cavium.com \
    --cc=cleech@redhat.com \
    --cc=lduncan@suse.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox