One bugfix (patch 1) I stumbled over while doing a cleanup (patch 2) of the xen-netback init/deinit code.
Juergen Gross (2): xen/netback: fix error path of xenvif_connect_data() xen/netback: cleanup init and deinit code
drivers/net/xen-netback/interface.c | 115 +++++++++++++++++------------------- 1 file changed, 54 insertions(+), 61 deletions(-)
xenvif_connect_data() calls module_put() in case of error. This is wrong as there is no related module_get().
Remove the superfluous module_put().
Fixes: 279f438e36c0a7 ("xen-netback: Don't destroy the netdev until the vif is shut down") Cc: stable@vger.kernel.org # 3.12 Signed-off-by: Juergen Gross jgross@suse.com --- drivers/net/xen-netback/interface.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index 240f762b3749..103ed00775eb 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c @@ -719,7 +719,6 @@ int xenvif_connect_data(struct xenvif_queue *queue, xenvif_unmap_frontend_data_rings(queue); netif_napi_del(&queue->napi); err: - module_put(THIS_MODULE); return err; }
On Mon, 14 Oct 2019 at 10:09, Juergen Gross jgross@suse.com wrote:
xenvif_connect_data() calls module_put() in case of error. This is wrong as there is no related module_get().
Remove the superfluous module_put().
Fixes: 279f438e36c0a7 ("xen-netback: Don't destroy the netdev until the vif is shut down") Cc: stable@vger.kernel.org # 3.12 Signed-off-by: Juergen Gross jgross@suse.com
Yes, looks like this should have been cleaned up a long time ago.
Reviewed-by: Paul Durrant paul@xen.org
drivers/net/xen-netback/interface.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index 240f762b3749..103ed00775eb 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c @@ -719,7 +719,6 @@ int xenvif_connect_data(struct xenvif_queue *queue, xenvif_unmap_frontend_data_rings(queue); netif_napi_del(&queue->napi); err:
module_put(THIS_MODULE); return err;
}
-- 2.16.4
From: Juergen Gross jgross@suse.com Date: Mon, 14 Oct 2019 11:09:08 +0200
One bugfix (patch 1) I stumbled over while doing a cleanup (patch 2) of the xen-netback init/deinit code.
Please do not mix cleanups and genuine bug fixes.
Submit the bug fix targetting the 'net' GIT tree, and once that eventually gets merged into 'net-next' you can submit the cleanup against that.
Thanks.
linux-stable-mirror@lists.linaro.org