From: Greg KH <gregkh@linuxfoundation.org>
To: SeongJae Park <sj@kernel.org>
Cc: stable@vger.kernel.org, xen-devel@lists.xenproject.org,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
"Juergen Gross" <jgross@suse.com>
Subject: Re: [PATCH for-stable-5.10.y] xen-blkfront: Cache feature_persistent value before advertisement
Date: Thu, 8 Sep 2022 13:50:04 +0200 [thread overview]
Message-ID: <YxnW7P7TYBu4ZCXS@kroah.com> (raw)
In-Reply-To: <20220906162414.105452-1-sj@kernel.org>
On Tue, Sep 06, 2022 at 04:24:14PM +0000, SeongJae Park wrote:
> commit fe8f65b018effbf473f53af3538d0c1878b8b329 upstream.
>
> Xen blkfront advertises its support of the persistent grants feature
> when it first setting up and when resuming in 'talk_to_blkback()'.
> Then, blkback reads the advertised value when it connects with blkfront
> and decides if it will use the persistent grants feature or not, and
> advertises its decision to blkfront. Blkfront reads the blkback's
> decision and it also makes the decision for the use of the feature.
>
> Commit 402c43ea6b34 ("xen-blkfront: Apply 'feature_persistent' parameter
> when connect"), however, made the blkfront's read of the parameter for
> disabling the advertisement, namely 'feature_persistent', to be done
> when it negotiate, not when advertise. Therefore blkfront advertises
> without reading the parameter. As the field for caching the parameter
> value is zero-initialized, it always advertises as the feature is
> disabled, so that the persistent grants feature becomes always disabled.
>
> This commit fixes the issue by making the blkfront does parmeter caching
> just before the advertisement.
>
> Fixes: 402c43ea6b34 ("xen-blkfront: Apply 'feature_persistent' parameter when connect")
> Cc: <stable@vger.kernel.org> # 5.10.x
> Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> Signed-off-by: SeongJae Park <sj@kernel.org>
> Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> Reviewed-by: Juergen Gross <jgross@suse.com>
> Link: https://lore.kernel.org/r/20220831165824.94815-4-sj@kernel.org
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
>
> This patch is a manual backport of the upstream commit on the 5.10.y
> kernel. Please note that this patch can be applied on the latest 5.10.y
> only after the preceding patch[1] is applied.
>
> [1] https://lore.kernel.org/stable/20220906132819.016040100@linuxfoundation.org/
Now queued up, thanks.
greg k-h
prev parent reply other threads:[~2022-09-08 11:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 16:24 [PATCH for-stable-5.10.y] xen-blkfront: Cache feature_persistent value before advertisement SeongJae Park
2022-09-08 11:50 ` Greg KH [this message]
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=YxnW7P7TYBu4ZCXS@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=jgross@suse.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marmarek@invisiblethingslab.com \
--cc=sj@kernel.org \
--cc=stable@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).