[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <161853823946.16006.3766095104419488377.b4-ty@oracle.com>
Date: Thu, 15 Apr 2021 22:51:21 -0400
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: james.bottomley@...senpartnership.com,
Tyrel Datwyler <tyreld@...ux.ibm.com>
Cc: "Martin K . Petersen" <martin.petersen@...cle.com>,
linux-kernel@...r.kernel.org,
Brian King <brking@...ux.vnet.ibm.com>,
linux-scsi@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
brking@...ux.ibm.com
Subject: Re: [PATCH] ibmvfc: Fix invalid state machine BUG_ON
On Mon, 12 Apr 2021 18:10:09 -0600, Tyrel Datwyler wrote:
> This fixes an issue hitting the BUG_ON in ibmvfc_do_work. When
> going through a host action of IBMVFC_HOST_ACTION_RESET,
> we change the action to IBMVFC_HOST_ACTION_TGT_DEL,
> then drop the host lock, and reset the CRQ, which changes
> the host state to IBMVFC_NO_CRQ. If, prior to setting the
> host state to IBMVFC_NO_CRQ, ibmvfc_init_host is called,
> it can then end up changing the host action to IBMVFC_HOST_ACTION_INIT.
> If we then change the host state to IBMVFC_NO_CRQ, we will then
> hit the BUG_ON. This patch makes a couple of changes to avoid this.
> It leaves the host action to be IBMVFC_HOST_ACTION_RESET
> or IBMVFC_HOST_ACTION_REENABLE until after we drop the host
> lock and reset or reenable the CRQ. It also hardens the
> host state machine to ensure we cannot leave the reset / reenable
> state until we've finished processing the reset or reenable.
Applied to 5.13/scsi-queue, thanks!
[1/1] ibmvfc: Fix invalid state machine BUG_ON
https://git.kernel.org/mkp/scsi/c/15cfef8623a4
--
Martin K. Petersen Oracle Linux Engineering
Powered by blists - more mailing lists