From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3B650A0A0C for ; Tue, 3 Aug 2021 14:22:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 329AB40E3C; Tue, 3 Aug 2021 14:22:23 +0200 (CEST) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mails.dpdk.org (Postfix) with ESMTP id F056840E3C for ; Tue, 3 Aug 2021 14:22:21 +0200 (CEST) Received: by mail-wr1-f41.google.com with SMTP id c16so25080588wrp.13 for ; Tue, 03 Aug 2021 05:22:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/1RUGWW0r8dgw9f1rBz03qzbVMrUrfxZScIvFTsUHA0=; b=LgYX6MC8nCKEikzjEfprtfvzwRoxQWEL6exXoG4Y8wdXNBveDH/8AesBPVDYmh99Ta giIz5gLNw3ZoAGv8NCXtvwJqZqAiUQUkYUZghd+NGreXWCj4oQjT28KxnnGqqtTiyDy7 viIodo2O+fZns5rOa875nvmLzIKbmg/JIogP07M/dSfIh+ZaApYWdO4S0yIZUk1urwxP SnjBd1xtuzVUg+P9DasmHESeuesOmsnKDMPAc7EiQrMKok6RtYLma2/3UyELj1Mgzux7 X/ynXqzGztQAp/5VnXKnuKXT1YBP3rXKJKVlwpPILu/M7zcXLQ8VcRR2nOX2sX9VVnCQ 55PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/1RUGWW0r8dgw9f1rBz03qzbVMrUrfxZScIvFTsUHA0=; b=nspkjrgc8PsAsbnV0VkHZ5xgP+q9BvoVskY9SPg7jC8S+3zqVTAWhUmqwFVWy5rA0V Ce5IgstHinTuFUAKDn4sUlU8TWfoeS7fRYFnVUU61XgDwSIWp5cqQOSd/QuEJvT37ZtG oWm1jtg4m8L+n9y4HzzzhNKVZmDwtvgrgUkvZhAkp9LMEHViQJMn8e4PCkArKSgWf44b zlJKrr9q9PD/8hvxmaS7xzFt+xuz706cZTp6HRJTxfzgDTlBUqa3k36r/2CTI0+N+ClH JLVjmv3hG8eC1cTT6lGjCYN7TpRIL4XfmPOhXbM484zpdoGvnMiDvFF8nVZLXyPmETKl eVbA== X-Gm-Message-State: AOAM532QmG3mXtYBiqT/654qNWVMHUYB/qBfIwUFoUS+zz8HjmfP/rYW M1+yNCSjCO4uY+3Foo4S/9E= X-Google-Smtp-Source: ABdhPJwtPaGy6K3G8aUWXyW0T+YC2zGyt8eYq1VuxChigxyyr8mKn4gwFhvvB5tcEskc49JmW38y/w== X-Received: by 2002:adf:ef85:: with SMTP id d5mr23098532wro.372.1627993341743; Tue, 03 Aug 2021 05:22:21 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id v6sm14337186wru.50.2021.08.03.05.22.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Aug 2021 05:22:21 -0700 (PDT) From: luca.boccassi@gmail.com To: Gaoxiang Liu Cc: Chenbo Xia , Maxime Coquelin , dpdk stable Date: Tue, 3 Aug 2021 13:21:52 +0100 Message-Id: <20210803122214.1094992-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210803122214.1094992-1-luca.boccassi@gmail.com> References: <20210726135322.149850-59-luca.boccassi@gmail.com> <20210803122214.1094992-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/virtio: fix interrupt handle leak' has been queued to stable release 20.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/05/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/f21bc78175084b36743acc375a8242fd16859fe6 Thanks. Luca Boccassi --- >From f21bc78175084b36743acc375a8242fd16859fe6 Mon Sep 17 00:00:00 2001 From: Gaoxiang Liu Date: Mon, 26 Jul 2021 22:42:05 +0800 Subject: [PATCH] net/virtio: fix interrupt handle leak [ upstream commit 7b9195154926b808e3ae23750eaff3e81cd5f529 ] Free memory of interrupt handle in virtio_user_dev_uninit() to avoid memory leak. when virtio user dev closes, memory of interrupt handle is not freed that is allocated in virtio_user_fill_intr_handle(). Fixes: 3d4fb6fd2505 ("net/virtio-user: support Rx interrupt") Signed-off-by: Gaoxiang Liu Reviewed-by: Chenbo Xia Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c index 202431ca22..e93e1919ab 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c @@ -599,6 +599,12 @@ void virtio_user_dev_uninit(struct virtio_user_dev *dev) { uint32_t i; + struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->port_id]; + + if (eth_dev->intr_handle) { + free(eth_dev->intr_handle); + eth_dev->intr_handle = NULL; + } virtio_user_stop_device(dev); -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-08-03 12:35:08.357143647 +0100 +++ 0003-net-virtio-fix-interrupt-handle-leak.patch 2021-08-03 12:35:08.166817770 +0100 @@ -1 +1 @@ -From 7b9195154926b808e3ae23750eaff3e81cd5f529 Mon Sep 17 00:00:00 2001 +From f21bc78175084b36743acc375a8242fd16859fe6 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7b9195154926b808e3ae23750eaff3e81cd5f529 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -18,2 +19,2 @@ - drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++++ - 1 file changed, 7 insertions(+) + drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 ++++++ + 1 file changed, 6 insertions(+) @@ -22 +23 @@ -index 1cd1e95f45..16c58710d7 100644 +index 202431ca22..e93e1919ab 100644 @@ -25,2 +26 @@ -@@ -654,6 +654,13 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues, - void +@@ -599,6 +599,12 @@ void @@ -29 +29,2 @@ -+ struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->hw.port_id]; + uint32_t i; ++ struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->port_id]; @@ -35 +36 @@ -+ + @@ -38 +38,0 @@ - rte_mem_event_callback_unregister(VIRTIO_USER_MEM_EVENT_CLB_NAME, dev);