From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6374DC433B4 for ; Wed, 14 Apr 2021 12:14:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3251F6100C for ; Wed, 14 Apr 2021 12:14:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350727AbhDNMPL (ORCPT ); Wed, 14 Apr 2021 08:15:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:55748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232338AbhDNMPD (ORCPT ); Wed, 14 Apr 2021 08:15:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4A25A6105A; Wed, 14 Apr 2021 12:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618402481; bh=YiabDS3/jUfuh8TT2QSI1OG4Od9EmNsYJXGvHAlYiss=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=C/Os0pNE9eiJYt1g2Dkn9Oi2/8bW3yZ351I0lQY4rz1eKQl1MtdWuBm4d5EKSm1mq NV5ZrDbVuJibAaXrXVeTQBFZzotHsKvWUwrvJ/KIPZGfqKOcsneymCZ/Si+Xievqiq 6InR65iZjGI7l9yyIX/IWZMmK+DVdQdW2yYhLcTcseP7ZddrEq9ts1GEzWsXIXUNP1 lOYCO1VvGhsOzoMZogbL3JQUQgoxNRLAbdpNKtU1m5vu2FFKQrm8Yx4PcDpX/d/iRg fkbRPQsrTrpoZW2mRvNAEYa7YvGDNcL9ObUe4bOvp9eomG53N4HnPbPRsgN2bEJeIa NYOMQpz3del6A== Date: Wed, 14 Apr 2021 08:14:40 -0400 From: Sasha Levin To: Mike Christie Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Gulam Mohamed , "Martin K . Petersen" , open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org Subject: Re: [PATCH AUTOSEL 5.10 07/22] scsi: iscsi: Fix race condition between login and sync thread Message-ID: References: <20210405160432.268374-1-sashal@kernel.org> <20210405160432.268374-7-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> >> [ 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 > > >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@oracle.com/T/#u As the fix isn't upstream yet, I'll drop 9e67600ed6b for now and re-queue it for the next round. Thanks! -- Thanks, Sasha