]> 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:05:09 +0000 (13:05 -0500)
commit87fd475dc4e354088f6534285388e7b061f54b35
tree59789516851278e726b979f1f16f36870a63fad0
parentade3082dcdee17c5767069883936d64ff83f6c9f
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