* [PATCH 1/1] scsi: iscsi: Fix set_param handling
@ 2021-10-10 16:19 Mike Christie
2021-10-11 1:11 ` Lee Duncan
2021-10-12 20:35 ` Martin K. Petersen
0 siblings, 2 replies; 4+ messages in thread
From: Mike Christie @ 2021-10-10 16:19 UTC (permalink / raw)
To: fengli, gulam.mohamed, martin.petersen, linux-scsi, jejb; +Cc: Mike Christie
In:
commit 9e67600ed6b8 ("scsi: iscsi: Fix race condition between login and
sync thread")
we meant to add a check where before we call set_param we make sure the
iscsi_cls_connection is bound. The problem is that between versions 4 and
5 of the patch the deletion of the unchecked set_param call was dropped
so we ended up with 2 calls. As a result we can still hit a crash where
we access the unbound connection on the first call.
This patch removes that first call.
Fixes: 9e67600ed6b8 ("scsi: iscsi: Fix race condition between login and
sync thread")
Signed-off-by: Mike Christie <michael.christie@oracle.com>
---
drivers/scsi/scsi_transport_iscsi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 922e4c7bd88e..78343d3f9385 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -2930,8 +2930,6 @@ iscsi_set_param(struct iscsi_transport *transport, struct iscsi_uevent *ev)
session->recovery_tmo = value;
break;
default:
- err = transport->set_param(conn, ev->u.set_param.param,
- data, ev->u.set_param.len);
if ((conn->state == ISCSI_CONN_BOUND) ||
(conn->state == ISCSI_CONN_UP)) {
err = transport->set_param(conn, ev->u.set_param.param,
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] scsi: iscsi: Fix set_param handling
2021-10-10 16:19 [PATCH 1/1] scsi: iscsi: Fix set_param handling Mike Christie
@ 2021-10-11 1:11 ` Lee Duncan
2021-10-11 2:05 ` Li Feng
2021-10-12 20:35 ` Martin K. Petersen
1 sibling, 1 reply; 4+ messages in thread
From: Lee Duncan @ 2021-10-11 1:11 UTC (permalink / raw)
To: Mike Christie, fengli, gulam.mohamed, martin.petersen, linux-scsi, jejb
On 10/10/21 9:19 AM, Mike Christie wrote:
> In:
>
> commit 9e67600ed6b8 ("scsi: iscsi: Fix race condition between login and
> sync thread")
>
> we meant to add a check where before we call set_param we make sure the
> iscsi_cls_connection is bound. The problem is that between versions 4 and
> 5 of the patch the deletion of the unchecked set_param call was dropped
> so we ended up with 2 calls. As a result we can still hit a crash where
> we access the unbound connection on the first call.
>
> This patch removes that first call.
>
> Fixes: 9e67600ed6b8 ("scsi: iscsi: Fix race condition between login and
> sync thread")
>
> Signed-off-by: Mike Christie <michael.christie@oracle.com>
> ---
> drivers/scsi/scsi_transport_iscsi.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
> index 922e4c7bd88e..78343d3f9385 100644
> --- a/drivers/scsi/scsi_transport_iscsi.c
> +++ b/drivers/scsi/scsi_transport_iscsi.c
> @@ -2930,8 +2930,6 @@ iscsi_set_param(struct iscsi_transport *transport, struct iscsi_uevent *ev)
> session->recovery_tmo = value;
> break;
> default:
> - err = transport->set_param(conn, ev->u.set_param.param,
> - data, ev->u.set_param.len);
> if ((conn->state == ISCSI_CONN_BOUND) ||
> (conn->state == ISCSI_CONN_UP)) {
> err = transport->set_param(conn, ev->u.set_param.param,
>
Reviewed-by: Lee Duncan <lduncan@suse.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] scsi: iscsi: Fix set_param handling
2021-10-11 1:11 ` Lee Duncan
@ 2021-10-11 2:05 ` Li Feng
0 siblings, 0 replies; 4+ messages in thread
From: Li Feng @ 2021-10-11 2:05 UTC (permalink / raw)
To: Lee Duncan
Cc: Mike Christie, Gulam Mohamed, Martin K. Petersen,
open list:SCSI TARGET SUBSYSTEM, James E.J. Bottomley
Lee Duncan <lduncan@suse.com> 于2021年10月11日周一 上午9:12写道:
>
> On 10/10/21 9:19 AM, Mike Christie wrote:
> > In:
> >
> > commit 9e67600ed6b8 ("scsi: iscsi: Fix race condition between login and
> > sync thread")
> >
> > we meant to add a check where before we call set_param we make sure the
> > iscsi_cls_connection is bound. The problem is that between versions 4 and
> > 5 of the patch the deletion of the unchecked set_param call was dropped
> > so we ended up with 2 calls. As a result we can still hit a crash where
> > we access the unbound connection on the first call.
> >
> > This patch removes that first call.
> >
> > Fixes: 9e67600ed6b8 ("scsi: iscsi: Fix race condition between login and
> > sync thread")
> >
> > Signed-off-by: Mike Christie <michael.christie@oracle.com>
> > ---
> > drivers/scsi/scsi_transport_iscsi.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
> > index 922e4c7bd88e..78343d3f9385 100644
> > --- a/drivers/scsi/scsi_transport_iscsi.c
> > +++ b/drivers/scsi/scsi_transport_iscsi.c
> > @@ -2930,8 +2930,6 @@ iscsi_set_param(struct iscsi_transport *transport, struct iscsi_uevent *ev)
> > session->recovery_tmo = value;
> > break;
> > default:
> > - err = transport->set_param(conn, ev->u.set_param.param,
> > - data, ev->u.set_param.len);
> > if ((conn->state == ISCSI_CONN_BOUND) ||
> > (conn->state == ISCSI_CONN_UP)) {
> > err = transport->set_param(conn, ev->u.set_param.param,
> >
>
> Reviewed-by: Lee Duncan <lduncan@suse.com>
>
Reviewed-by: Li Feng <fengli@smartx.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] scsi: iscsi: Fix set_param handling
2021-10-10 16:19 [PATCH 1/1] scsi: iscsi: Fix set_param handling Mike Christie
2021-10-11 1:11 ` Lee Duncan
@ 2021-10-12 20:35 ` Martin K. Petersen
1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-10-12 20:35 UTC (permalink / raw)
To: linux-scsi, fengli, jejb, gulam.mohamed, Mike Christie
Cc: Martin K . Petersen
On Sun, 10 Oct 2021 11:19:04 -0500, Mike Christie wrote:
> In:
>
> commit 9e67600ed6b8 ("scsi: iscsi: Fix race condition between login and
> sync thread")
>
> we meant to add a check where before we call set_param we make sure the
> iscsi_cls_connection is bound. The problem is that between versions 4 and
> 5 of the patch the deletion of the unchecked set_param call was dropped
> so we ended up with 2 calls. As a result we can still hit a crash where
> we access the unbound connection on the first call.
>
> [...]
Applied to 5.15/scsi-fixes, thanks!
[1/1] scsi: iscsi: Fix set_param handling
https://git.kernel.org/mkp/scsi/c/187a580c9e78
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-12 20:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-10 16:19 [PATCH 1/1] scsi: iscsi: Fix set_param handling Mike Christie
2021-10-11 1:11 ` Lee Duncan
2021-10-11 2:05 ` Li Feng
2021-10-12 20:35 ` 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.