* [PATCH] scsi: qla4xxx: fix a potential NULL pointer dereference
@ 2019-03-14 6:30 Kangjie Lu
2019-03-23 22:39 ` Aditya Pakki
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Kangjie Lu @ 2019-03-14 6:30 UTC (permalink / raw)
To: kjlu
Cc: pakki001, QLogic-Storage-Upstream, James E.J. Bottomley,
Martin K. Petersen, linux-scsi, linux-kernel
In case iscsi_lookup_endpoint fails, the fix returns -EINVAL to
avoid NULL pointer dereference.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
---
drivers/scsi/qla4xxx/ql4_os.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index a77bfb224248..80289c885c07 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -3203,6 +3203,8 @@ static int qla4xxx_conn_bind(struct iscsi_cls_session *cls_session,
if (iscsi_conn_bind(cls_session, cls_conn, is_leading))
return -EINVAL;
ep = iscsi_lookup_endpoint(transport_fd);
+ if (!ep)
+ return -EINVAL;
conn = cls_conn->dd_data;
qla_conn = conn->dd_data;
qla_conn->qla_ep = ep->dd_data;
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: qla4xxx: fix a potential NULL pointer dereference
2019-03-14 6:30 [PATCH] scsi: qla4xxx: fix a potential NULL pointer dereference Kangjie Lu
@ 2019-03-23 22:39 ` Aditya Pakki
2019-03-25 6:18 ` Manish Rangankar
2019-03-26 2:25 ` Martin K. Petersen
2 siblings, 0 replies; 6+ messages in thread
From: Aditya Pakki @ 2019-03-23 22:39 UTC (permalink / raw)
Cc: Kangjie Lu, QLogic-Storage-Upstream, James E.J. Bottomley,
Martin K. Petersen, linux-scsi, linux-kernel
On 3/14/19 1:30 AM, Kangjie Lu wrote:
> In case iscsi_lookup_endpoint fails, the fix returns -EINVAL to
> avoid NULL pointer dereference.
>
> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
> ---
> drivers/scsi/qla4xxx/ql4_os.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
> index a77bfb224248..80289c885c07 100644
> --- a/drivers/scsi/qla4xxx/ql4_os.c
> +++ b/drivers/scsi/qla4xxx/ql4_os.c
> @@ -3203,6 +3203,8 @@ static int qla4xxx_conn_bind(struct iscsi_cls_session *cls_session,
> if (iscsi_conn_bind(cls_session, cls_conn, is_leading))
> return -EINVAL;
> ep = iscsi_lookup_endpoint(transport_fd);
> + if (!ep)
> + return -EINVAL;
> conn = cls_conn->dd_data;
> qla_conn = conn->dd_data;
> qla_conn->qla_ep = ep->dd_data;
Gentle reminder, could someone please review this ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: qla4xxx: fix a potential NULL pointer dereference
@ 2019-03-23 22:39 ` Aditya Pakki
0 siblings, 0 replies; 6+ messages in thread
From: Aditya Pakki @ 2019-03-23 22:39 UTC (permalink / raw)
Cc: Kangjie Lu, QLogic-Storage-Upstream, James E.J. Bottomley,
Martin K. Petersen, linux-scsi, linux-kernel
On 3/14/19 1:30 AM, Kangjie Lu wrote:
> In case iscsi_lookup_endpoint fails, the fix returns -EINVAL to
> avoid NULL pointer dereference.
>
> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
> ---
> drivers/scsi/qla4xxx/ql4_os.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
> index a77bfb224248..80289c885c07 100644
> --- a/drivers/scsi/qla4xxx/ql4_os.c
> +++ b/drivers/scsi/qla4xxx/ql4_os.c
> @@ -3203,6 +3203,8 @@ static int qla4xxx_conn_bind(struct iscsi_cls_session *cls_session,
> if (iscsi_conn_bind(cls_session, cls_conn, is_leading))
> return -EINVAL;
> ep = iscsi_lookup_endpoint(transport_fd);
> + if (!ep)
> + return -EINVAL;
> conn = cls_conn->dd_data;
> qla_conn = conn->dd_data;
> qla_conn->qla_ep = ep->dd_data;
Gentle reminder, could someone please review this ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] scsi: qla4xxx: fix a potential NULL pointer dereference
2019-03-14 6:30 [PATCH] scsi: qla4xxx: fix a potential NULL pointer dereference Kangjie Lu
@ 2019-03-25 6:18 ` Manish Rangankar
2019-03-25 6:18 ` Manish Rangankar
2019-03-26 2:25 ` Martin K. Petersen
2 siblings, 0 replies; 6+ messages in thread
From: Manish Rangankar @ 2019-03-25 6:18 UTC (permalink / raw)
To: Kangjie Lu
Cc: pakki001, QLogic-Storage-Upstream, James E.J. Bottomley,
Martin K. Petersen, linux-scsi, linux-kernel
> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org <linux-scsi-
> owner@vger.kernel.org> On Behalf Of Kangjie Lu
> Sent: Thursday, March 14, 2019 12:01 PM
> To: kjlu@umn.edu
> Cc: pakki001@umn.edu; QLogic-Storage-Upstream@qlogic.com; James E.J.
> Bottomley <jejb@linux.ibm.com>; Martin K. Petersen
> <martin.petersen@oracle.com>; linux-scsi@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH] scsi: qla4xxx: fix a potential NULL pointer dereference
>
> In case iscsi_lookup_endpoint fails, the fix returns -EINVAL to avoid NULL
> pointer dereference.
>
> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
> ---
> drivers/scsi/qla4xxx/ql4_os.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
> index a77bfb224248..80289c885c07 100644
> --- a/drivers/scsi/qla4xxx/ql4_os.c
> +++ b/drivers/scsi/qla4xxx/ql4_os.c
> @@ -3203,6 +3203,8 @@ static int qla4xxx_conn_bind(struct
> iscsi_cls_session *cls_session,
> if (iscsi_conn_bind(cls_session, cls_conn, is_leading))
> return -EINVAL;
> ep = iscsi_lookup_endpoint(transport_fd);
> + if (!ep)
> + return -EINVAL;
> conn = cls_conn->dd_data;
> qla_conn = conn->dd_data;
> qla_conn->qla_ep = ep->dd_data;
> --
> 2.17.1
Thanks
Acked-by: Manish Rangankar <mrangankar@marvell.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] scsi: qla4xxx: fix a potential NULL pointer dereference
@ 2019-03-25 6:18 ` Manish Rangankar
0 siblings, 0 replies; 6+ messages in thread
From: Manish Rangankar @ 2019-03-25 6:18 UTC (permalink / raw)
To: Kangjie Lu
Cc: pakki001, QLogic-Storage-Upstream, James E.J. Bottomley,
Martin K. Petersen, linux-scsi, linux-kernel
> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org <linux-scsi-
> owner@vger.kernel.org> On Behalf Of Kangjie Lu
> Sent: Thursday, March 14, 2019 12:01 PM
> To: kjlu@umn.edu
> Cc: pakki001@umn.edu; QLogic-Storage-Upstream@qlogic.com; James E.J.
> Bottomley <jejb@linux.ibm.com>; Martin K. Petersen
> <martin.petersen@oracle.com>; linux-scsi@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH] scsi: qla4xxx: fix a potential NULL pointer dereference
>
> In case iscsi_lookup_endpoint fails, the fix returns -EINVAL to avoid NULL
> pointer dereference.
>
> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
> ---
> drivers/scsi/qla4xxx/ql4_os.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
> index a77bfb224248..80289c885c07 100644
> --- a/drivers/scsi/qla4xxx/ql4_os.c
> +++ b/drivers/scsi/qla4xxx/ql4_os.c
> @@ -3203,6 +3203,8 @@ static int qla4xxx_conn_bind(struct
> iscsi_cls_session *cls_session,
> if (iscsi_conn_bind(cls_session, cls_conn, is_leading))
> return -EINVAL;
> ep = iscsi_lookup_endpoint(transport_fd);
> + if (!ep)
> + return -EINVAL;
> conn = cls_conn->dd_data;
> qla_conn = conn->dd_data;
> qla_conn->qla_ep = ep->dd_data;
> --
> 2.17.1
Thanks
Acked-by: Manish Rangankar <mrangankar@marvell.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: qla4xxx: fix a potential NULL pointer dereference
2019-03-14 6:30 [PATCH] scsi: qla4xxx: fix a potential NULL pointer dereference Kangjie Lu
2019-03-23 22:39 ` Aditya Pakki
2019-03-25 6:18 ` Manish Rangankar
@ 2019-03-26 2:25 ` Martin K. Petersen
2 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2019-03-26 2:25 UTC (permalink / raw)
To: Kangjie Lu
Cc: pakki001, QLogic-Storage-Upstream, James E.J. Bottomley,
Martin K. Petersen, linux-scsi, linux-kernel
Kangjie,
> In case iscsi_lookup_endpoint fails, the fix returns -EINVAL to avoid
> NULL pointer dereference.
Applied to 5.1/scsi-fixes, thanks.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-03-26 2:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-14 6:30 [PATCH] scsi: qla4xxx: fix a potential NULL pointer dereference Kangjie Lu
2019-03-23 22:39 ` Aditya Pakki
2019-03-23 22:39 ` Aditya Pakki
2019-03-25 6:18 ` Manish Rangankar
2019-03-25 6:18 ` Manish Rangankar
2019-03-26 2:25 ` 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.