opnsense-src/sys/dev/xen
Roger Pau Monné c1782c2d28 xen-netfront: attempt to make cleanup idempotent
Current cleanup code assumes that all the fields are allocated and/or setup by
the time cleanup is called, but this is not always true: a failure in mid-setup
of the device will cause the functions to be called with possibly uninitialized
fields.

Fix the functions to cope with such sate, while also attempting to make the
cleanup idempotent.

Finally fix an error path during setup that would not mark the device as
closed, and hence prevents the kernel from finishing booting.

Fixes: 96375eac94 ("xen-netfront: add multiqueue support")
Sponsored by: Citrix Systems R&D

(cherry picked from commit 318bbb6d5a1eae77eb5dc687bcc63c0f99558e21)
2024-10-11 09:06:25 +02:00
..
balloon sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
blkback sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
blkfront sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
bus sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
console sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
control xen: improve shutdown hook 2023-12-08 18:02:44 -04:00
cpu sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
debug sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
efi sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
evtchn sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gntdev gntdev: Handle errors from suword32() in gntdev_alloc_gref() 2024-01-01 19:29:56 -05:00
grant_table xen: fix initialization of grant table frame array 2024-10-11 09:06:13 +02:00
netback sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
netfront xen-netfront: attempt to make cleanup idempotent 2024-10-11 09:06:25 +02:00
privcmd sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
timer sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
xenpci sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
xenstore sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00