* [PATCH] bnx2i: missing error code in bnx2i_ep_connect()
@ 2017-06-23 7:02 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2017-06-23 7:02 UTC (permalink / raw)
To: QLogic-Storage-Upstream, Michael Chan
Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi, kernel-janitors
If bnx2i_map_ep_dbell_regs() then we accidentally return NULL instead
of an error pointer. It results in a NULL dereference in
iscsi_if_ep_connect().
Fixes: cf4e6363859d ("[SCSI] bnx2i: Add bnx2i iSCSI driver.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index f32a66f89d25..03c104b47f31 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -1909,7 +1909,8 @@ static struct iscsi_endpoint *bnx2i_ep_connect(struct Scsi_Host *shost,
bnx2i_ep_active_list_add(hba, bnx2i_ep);
- if (bnx2i_map_ep_dbell_regs(bnx2i_ep))
+ rc = bnx2i_map_ep_dbell_regs(bnx2i_ep);
+ if (rc)
goto del_active_ep;
mutex_unlock(&hba->net_dev_lock);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] bnx2i: missing error code in bnx2i_ep_connect()
@ 2017-06-23 7:02 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2017-06-23 7:02 UTC (permalink / raw)
To: QLogic-Storage-Upstream, Michael Chan
Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi, kernel-janitors
If bnx2i_map_ep_dbell_regs() then we accidentally return NULL instead
of an error pointer. It results in a NULL dereference in
iscsi_if_ep_connect().
Fixes: cf4e6363859d ("[SCSI] bnx2i: Add bnx2i iSCSI driver.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index f32a66f89d25..03c104b47f31 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -1909,7 +1909,8 @@ static struct iscsi_endpoint *bnx2i_ep_connect(struct Scsi_Host *shost,
bnx2i_ep_active_list_add(hba, bnx2i_ep);
- if (bnx2i_map_ep_dbell_regs(bnx2i_ep))
+ rc = bnx2i_map_ep_dbell_regs(bnx2i_ep);
+ if (rc)
goto del_active_ep;
mutex_unlock(&hba->net_dev_lock);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] bnx2i: missing error code in bnx2i_ep_connect()
2017-06-23 7:02 ` Dan Carpenter
@ 2017-06-23 7:13 ` Johannes Thumshirn
-1 siblings, 0 replies; 6+ messages in thread
From: Johannes Thumshirn @ 2017-06-23 7:13 UTC (permalink / raw)
To: Dan Carpenter
Cc: QLogic-Storage-Upstream, Michael Chan, James E.J. Bottomley,
Martin K. Petersen, linux-scsi, kernel-janitors
On Fri, Jun 23, 2017 at 10:02:00AM +0300, Dan Carpenter wrote:
> If bnx2i_map_ep_dbell_regs() then we accidentally return NULL instead
> of an error pointer. It results in a NULL dereference in
> iscsi_if_ep_connect().
>
> Fixes: cf4e6363859d ("[SCSI] bnx2i: Add bnx2i iSCSI driver.")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
Johannes Thumshirn Storage
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] bnx2i: missing error code in bnx2i_ep_connect()
@ 2017-06-23 7:13 ` Johannes Thumshirn
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Thumshirn @ 2017-06-23 7:13 UTC (permalink / raw)
To: Dan Carpenter
Cc: QLogic-Storage-Upstream, Michael Chan, James E.J. Bottomley,
Martin K. Petersen, linux-scsi, kernel-janitors
On Fri, Jun 23, 2017 at 10:02:00AM +0300, Dan Carpenter wrote:
> If bnx2i_map_ep_dbell_regs() then we accidentally return NULL instead
> of an error pointer. It results in a NULL dereference in
> iscsi_if_ep_connect().
>
> Fixes: cf4e6363859d ("[SCSI] bnx2i: Add bnx2i iSCSI driver.")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
Johannes Thumshirn Storage
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] bnx2i: missing error code in bnx2i_ep_connect()
2017-06-23 7:02 ` Dan Carpenter
@ 2017-06-26 17:34 ` Martin K. Petersen
-1 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2017-06-26 17:34 UTC (permalink / raw)
To: Dan Carpenter
Cc: QLogic-Storage-Upstream, Michael Chan, James E.J. Bottomley,
Martin K. Petersen, linux-scsi, kernel-janitors
Dan,
> If bnx2i_map_ep_dbell_regs() then we accidentally return NULL instead
> of an error pointer. It results in a NULL dereference in
> iscsi_if_ep_connect().
Applied to 4.13/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] bnx2i: missing error code in bnx2i_ep_connect()
@ 2017-06-26 17:34 ` Martin K. Petersen
0 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2017-06-26 17:34 UTC (permalink / raw)
To: Dan Carpenter
Cc: QLogic-Storage-Upstream, Michael Chan, James E.J. Bottomley,
Martin K. Petersen, linux-scsi, kernel-janitors
Dan,
> If bnx2i_map_ep_dbell_regs() then we accidentally return NULL instead
> of an error pointer. It results in a NULL dereference in
> iscsi_if_ep_connect().
Applied to 4.13/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-06-26 17:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23 7:02 [PATCH] bnx2i: missing error code in bnx2i_ep_connect() Dan Carpenter
2017-06-23 7:02 ` Dan Carpenter
2017-06-23 7:13 ` Johannes Thumshirn
2017-06-23 7:13 ` Johannes Thumshirn
2017-06-26 17:34 ` Martin K. Petersen
2017-06-26 17:34 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.