xen/netfront: read response from backend only once
authorJuergen Gross <jgross@suse.com>
Tue, 24 Aug 2021 10:28:06 +0000 (12:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Dec 2021 08:19:09 +0000 (09:19 +0100)
commitf5e493709800243181e268ddbfae949d2cc37f0b
tree2d09749cbc55fa2c214e51b7cd8b301137dd6e57
parent1ffb20f0527dab03c17f0182ec6a63b9301af5f1
xen/netfront: read response from backend only once

commit 8446066bf8c1f9f7b7412c43fbea0fb87464d75b 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/xen-netfront.c