Re: [PATCH AUTOSEL 5.10 07/22] scsi: iscsi: Fix race condition between login and sync thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 06, 2021 at 12:24:32PM -0500, Mike Christie wrote:
> On 4/5/21 11:04 AM, Sasha Levin wrote:
> > From: Gulam Mohamed <gulam.mohamed@xxxxxxxxxx>
> > 
> > [ Upstream commit 9e67600ed6b8565da4b85698ec659b5879a6c1c6 ]
> > 
> > A kernel panic was observed due to a timing issue between the sync thread
> > and the initiator processing a login response from the target. The session
> > reopen can be invoked both from the session sync thread when iscsid
> > restarts and from iscsid through the error handler. Before the initiator
> > receives the response to a login, another reopen request can be sent from
> > the error handler/sync session. When the initial login response is
> > subsequently processed, the connection has been closed and the socket has
> > been released.
> > 
> > To fix this a new connection state, ISCSI_CONN_BOUND, is added:
> > 
> >  - Set the connection state value to ISCSI_CONN_DOWN upon
> >    iscsi_if_ep_disconnect() and iscsi_if_stop_conn()
> > 
> >  - Set the connection state to the newly created value ISCSI_CONN_BOUND
> >    after bind connection (transport->bind_conn())
> > 
> >  - In iscsi_set_param(), return -ENOTCONN if the connection state is not
> >    either ISCSI_CONN_BOUND or ISCSI_CONN_UP
> > 
> > Link: https://urldefense.com/v3/__https://lore.kernel.org/r/20210325093248.284678-1-gulam.mohamed@oracle.com__;!!GqivPVa7Brio!Jiqrc6pu3EgrquzpG-KpNQkNebwKUgctkE0MN1MloQ2y5Y4OVOkKN0yCr2_W_CX2oRet$ 
> > Reviewed-by: Mike Christie <michael.christie@xxxxxxxxxx>
> 
> 
> There was a mistake in my review of this patch. It will also require
> this "[PATCH 1/1] scsi: iscsi: fix iscsi cls conn state":
> 
> https://lore.kernel.org/linux-scsi/20210406171746.5016-1-michael.christie@xxxxxxxxxx/T/#u
> 
> 

I don't see this in Linus's tree yet, so we can't take it until then :(

thanks,

greg k-h



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux