Please apply "xen-netback: delete NAPI instance when queue fails to initialize" to v4.4.y

From: SeongJae Park
Date: Wed Feb 24 2021 - 12:06:30 EST


This is a request for merge of upstream commit 4a658527271b ("xen-netback:
delete NAPI instance when queue fails to initialize") on v4.4.y tree.

If 'xenvif_connect()' fails after successful 'netif_napi_add()', the napi is
not cleaned up. Because 'create_queues()' frees the queues in its error
handling code, if the 'xenvif_free()' is called for the vif, use-after-free
occurs. The upstream commit fixes the problem by cleaning up the napi in the
'xenvif_connect()'.

Attaching the original patch below for your convenience.

Tested-by: Markus Boehme <markubo@xxxxxxxxx>


Thanks,
SeongJae Park

==================================== >8 =======================================