xen/blkfront: read response from backend only once
authorJuergen Gross <jgross@suse.com>
Mon, 29 Nov 2021 07:41:07 +0000 (08:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Dec 2021 08:27:44 +0000 (09:27 +0100)
commitb647c449f166a99fd5a011e4a2bc6f8b9fcd3222
treee9536982d22e8816bd65305d617e1726e0d20fe0
parentdcbfd3f13b1363a358e65b1800aac840d176eacc
xen/blkfront: read response from backend only once

commit 71b66243f9898d0e54296b4e7035fb33cdcb0707 upstream.

In order to avoid problems in case the backend is modifying a response
on the ring page while the frontend has already seen it, just read the
response into a local buffer in one go and then operate on that buffer
only.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Link: https://lore.kernel.org/r/20210730103854.12681-2-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/xen-blkfront.c