All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: james.bottomley@hansenpartnership.com,
	Tyrel Datwyler <tyreld@linux.ibm.com>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
	linuxppc-dev@lists.ozlabs.org, brking@linux.ibm.com,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] ibmvfc: fix command state accounting and stale response detection
Date: Wed, 28 Jul 2021 23:37:07 -0400	[thread overview]
Message-ID: <162752979292.3014.14406303368375387867.b4-ty@oracle.com> (raw)
In-Reply-To: <20210716205220.1101150-1-tyreld@linux.ibm.com>

On Fri, 16 Jul 2021 14:52:20 -0600, Tyrel Datwyler wrote:

> Prior to commit 1f4a4a19508d ("scsi: ibmvfc: Complete commands outside
> the host/queue lock") responses to commands were completed sequentially
> with the host lock held such that a command had a basic binary state of
> active or free. It was therefore a simple affair of ensuring the
> assocaiated ibmvfc_event to a VIOS response was valid by testing that it
> was not already free. The lock relexation work to complete commands
> outside the lock inadverdently made it a trinary command state such that
> a command is either in flight, received and being completed, or
> completed and now free. This breaks the stale command detection logic as
> a command may be still marked active and been placed on the delayed
> completion list when a second stale response for the same command
> arrives. This can lead to double completions and list corruption. This
> issue was exposed by a recent VIOS regression were a missing memory
> barrier could occasionally result in the ibmvfc client receiveing a
> duplicate response for the same command.
> 
> [...]

Applied to 5.14/scsi-fixes, thanks!

[1/1] ibmvfc: fix command state accounting and stale response detection
      https://git.kernel.org/mkp/scsi/c/73bfdf707d01

-- 
Martin K. Petersen	Oracle Linux Engineering

WARNING: multiple messages have this Message-ID (diff)
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: james.bottomley@hansenpartnership.com,
	Tyrel Datwyler <tyreld@linux.ibm.com>
Cc: linux-scsi@vger.kernel.org,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	brking@linux.ibm.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] ibmvfc: fix command state accounting and stale response detection
Date: Wed, 28 Jul 2021 23:37:07 -0400	[thread overview]
Message-ID: <162752979292.3014.14406303368375387867.b4-ty@oracle.com> (raw)
In-Reply-To: <20210716205220.1101150-1-tyreld@linux.ibm.com>

On Fri, 16 Jul 2021 14:52:20 -0600, Tyrel Datwyler wrote:

> Prior to commit 1f4a4a19508d ("scsi: ibmvfc: Complete commands outside
> the host/queue lock") responses to commands were completed sequentially
> with the host lock held such that a command had a basic binary state of
> active or free. It was therefore a simple affair of ensuring the
> assocaiated ibmvfc_event to a VIOS response was valid by testing that it
> was not already free. The lock relexation work to complete commands
> outside the lock inadverdently made it a trinary command state such that
> a command is either in flight, received and being completed, or
> completed and now free. This breaks the stale command detection logic as
> a command may be still marked active and been placed on the delayed
> completion list when a second stale response for the same command
> arrives. This can lead to double completions and list corruption. This
> issue was exposed by a recent VIOS regression were a missing memory
> barrier could occasionally result in the ibmvfc client receiveing a
> duplicate response for the same command.
> 
> [...]

Applied to 5.14/scsi-fixes, thanks!

[1/1] ibmvfc: fix command state accounting and stale response detection
      https://git.kernel.org/mkp/scsi/c/73bfdf707d01

-- 
Martin K. Petersen	Oracle Linux Engineering

  parent reply	other threads:[~2021-07-29  3:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 20:52 [PATCH] ibmvfc: fix command state accounting and stale response detection Tyrel Datwyler
2021-07-16 20:52 ` Tyrel Datwyler
2021-07-17 15:34 ` Christophe Leroy
2021-07-17 15:34   ` Christophe Leroy
2021-07-29  3:37 ` Martin K. Petersen [this message]
2021-07-29  3:37   ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=162752979292.3014.14406303368375387867.b4-ty@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=brking@linux.ibm.com \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=stable@vger.kernel.org \
    --cc=tyreld@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.