diff options
author | Feng Liu <[email protected]> | 2023-05-12 11:18:12 -0400 |
---|---|---|
committer | David S. Miller <[email protected]> | 2023-05-15 08:46:48 +0100 |
commit | 5306623a9826aa7d63b32c6a3803c798a765474d (patch) | |
tree | 895b87217468e6fbe5151d7523402ce3fdcb3364 /lib/mpi/mpiutil.c | |
parent | 6ead9c98cafcbc6992cf35f0ca393df2c03e3316 (diff) |
virtio_net: Fix error unwinding of XDP initialization
When initializing XDP in virtnet_open(), some rq xdp initialization
may hit an error causing net device open failed. However, previous
rqs have already initialized XDP and enabled NAPI, which is not the
expected behavior. Need to roll back the previous rq initialization
to avoid leaks in error unwinding of init code.
Also extract helper functions of disable and enable queue pairs.
Use newly introduced disable helper function in error unwinding and
virtnet_close. Use enable helper function in virtnet_open.
Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info")
Signed-off-by: Feng Liu <[email protected]>
Reviewed-by: Jiri Pirko <[email protected]>
Reviewed-by: William Tu <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Acked-by: Jason Wang <[email protected]>
Reviewed-by: Xuan Zhuo <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions