]> git.hungrycats.org Git - linux/commit
xen-netback: Zero out sring pointers on unmap
authorTu Dinh <ngoc-tu.dinh@vates.tech>
Sat, 7 Nov 2026 11:35:51 +0000 (12:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Nov 2026 18:07:06 +0000 (13:07 -0500)
commitc5f54af611ff6fe1d53fa05d8e87b469dc56122b
treecfc439bba09a6a9f24ee2df8e0bb3574d247aeda
parenta97aa838903d15f865d80809f5198ff459c6634a
xen-netback: Zero out sring pointers on unmap

commit f96f16592a32430a0582309d73a873b6d3ee2bdb upstream.

If xenvif_map_frontend_data_rings() fails when a ring is already mapped,
it unmaps them via xenvif_unmap_frontend_data_rings() which keeps the
ring pointers unchanged. xenvif_connect_data()'s cleanup path calls
xenvif_disconnect_queue() which in turn calls
xenvif_unmap_frontend_data_rings() again, which will attempt to unmap the
pointers a second time.

Zero out the ring pointers after they are unmapped to avoid this issue.

This is XSA-532

Fixes: 2ac061ce97f4 ("xen/netback: cleanup init and deinit code")
Signed-off-by: Tu Dinh <ngoc-tu.dinh@vates.tech>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/xen-netback/netback.c