public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* Apply "nvme: Fix parsing of ANA log page" to 5.4
@ 2022-02-10  0:17 Uday Shankar
  2022-02-11 11:29 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Uday Shankar @ 2022-02-10  0:17 UTC (permalink / raw)
  To: stable
  Cc: Prabhath Sajeepa, linux-nvme, Greg Kroah-Hartman, Sasha Levin,
	Uday Shankar

Hello,

Please apply the patch "nvme: Fix parsing of ANA log page" to 5.4.

The commit ID in Linus's tree is:
	64fab7290dc3561729bbc1e35895a517eb2e549e

The patch was originally submitted on the linux-nvme mailing list, but
for reasons unknown to me it never landed on 5.4 - this thread indicates
it should have been accepted for 5.4.
https://lore.kernel.org/linux-nvme/1572303408-37913-1-git-send-email-psajeepa@purestorage.com/T/#u

Without the patch, we perform the check
	WARN_ON_ONCE(offset > ctrl->ana_log_size - sizeof(*desc))
at the end of the enclosing loop. This check only makes sense if we are
about to read another nvme_ana_group_desc from the ana_log_buf, but
that's not the case at the end of the last iteration of the loop. In the
last iteration, the warning fires and the function nvme_parse_ana_log
fails. When nvme native multipath is enabled, this translates into
failure to establish a connection to the controller.

The patch fixes the issue by moving the above check to a correct
position within the loop body.

Thanks,
Uday Shankar


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Apply "nvme: Fix parsing of ANA log page" to 5.4
  2022-02-10  0:17 Apply "nvme: Fix parsing of ANA log page" to 5.4 Uday Shankar
@ 2022-02-11 11:29 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2022-02-11 11:29 UTC (permalink / raw)
  To: Uday Shankar; +Cc: stable, Prabhath Sajeepa, linux-nvme, Sasha Levin

On Wed, Feb 09, 2022 at 05:17:21PM -0700, Uday Shankar wrote:
> Hello,
> 
> Please apply the patch "nvme: Fix parsing of ANA log page" to 5.4.
> 
> The commit ID in Linus's tree is:
> 	64fab7290dc3561729bbc1e35895a517eb2e549e
> 
> The patch was originally submitted on the linux-nvme mailing list, but
> for reasons unknown to me it never landed on 5.4 - this thread indicates
> it should have been accepted for 5.4.
> https://lore.kernel.org/linux-nvme/1572303408-37913-1-git-send-email-psajeepa@purestorage.com/T/#u
> 
> Without the patch, we perform the check
> 	WARN_ON_ONCE(offset > ctrl->ana_log_size - sizeof(*desc))
> at the end of the enclosing loop. This check only makes sense if we are
> about to read another nvme_ana_group_desc from the ana_log_buf, but
> that's not the case at the end of the last iteration of the loop. In the
> last iteration, the warning fires and the function nvme_parse_ana_log
> fails. When nvme native multipath is enabled, this translates into
> failure to establish a connection to the controller.
> 
> The patch fixes the issue by moving the above check to a correct
> position within the loop body.

Now queued up,t hanks.

greg k-h


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-11 11:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-10  0:17 Apply "nvme: Fix parsing of ANA log page" to 5.4 Uday Shankar
2022-02-11 11:29 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox