From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0B5B0A054C for ; Fri, 14 Feb 2020 18:05:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 02F18F72; Fri, 14 Feb 2020 18:05:02 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id A5555F72 for ; Fri, 14 Feb 2020 18:05:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581699900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qUbOzVBa7P9wJH0gcwwZpaStEK2CHtEP4amYKD5+9Mo=; b=PPTfwo27Z4pE7OyxUNW1KanYxz/QuBW+AM2gqkB8eynJdoAGnuNHkJWMEcL9pdb0vpg3bU GLU4eq3WnqHqytuZ6gL1UxWWXtx0fsWDLMOlzWiX+t+imaimDfi0XEca7/YYfrs+87tTCa 32a0XCG/O1p10PJ9qkEhepQKmHH/vDE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-399-bzElAgQuOpaeFAMYiPgEhg-1; Fri, 14 Feb 2020 12:04:57 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1FA4E18C35AD; Fri, 14 Feb 2020 17:04:56 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F60084BCD; Fri, 14 Feb 2020 17:04:54 +0000 (UTC) From: Kevin Traynor To: Yunjian Wang Cc: Ferruh Yigit , dpdk stable Date: Fri, 14 Feb 2020 17:03:13 +0000 Message-Id: <20200214170337.25093-19-ktraynor@redhat.com> In-Reply-To: <20200214170337.25093-1-ktraynor@redhat.com> References: <20200214170337.25093-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: bzElAgQuOpaeFAMYiPgEhg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/tap: fix memory leak when unregister intr handler' has been queued to LTS release 18.11.7 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 LTS release 18.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/20/20. 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 rebasi= ng (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/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/058e984cf3af93044a= bcb20b9ef96ff7224cdcf4 Thanks. Kevin. --- >From 058e984cf3af93044abcb20b9ef96ff7224cdcf4 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Tue, 21 Jan 2020 10:12:43 +0800 Subject: [PATCH] net/tap: fix memory leak when unregister intr handler [ upstream commit c5f9911d34650768355573bc53e0b621760c4124 ] The return check of function tap_lsc_intr_handle_set() is wrong, it should be 0 or a positive number if success. So the intr_handle->intr_vec was not been freed when tap_lsc_intr_handle_set() returned a positive number. Fixes: 4870a8cdd968 ("net/tap: support Rx interrupt") Signed-off-by: Yunjian Wang Acked-by: Ferruh Yigit --- drivers/net/tap/rte_eth_tap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 775619331e..3a8aa44a73 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -1523,6 +1523,9 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set) =20 =09err =3D tap_lsc_intr_handle_set(dev, set); -=09if (err) +=09if (err < 0) { +=09=09if (!set) +=09=09=09tap_rx_intr_vec_set(dev, 0); =09=09return err; +=09} =09err =3D tap_rx_intr_vec_set(dev, set); =09if (err && set) --=20 2.21.1 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092020-02-14 17:02:38.086448727 +0000 +++ 0019-net-tap-fix-memory-leak-when-unregister-intr-handler.patch=092020-= 02-14 17:02:36.953407896 +0000 @@ -1 +1 @@ -From c5f9911d34650768355573bc53e0b621760c4124 Mon Sep 17 00:00:00 2001 +From 058e984cf3af93044abcb20b9ef96ff7224cdcf4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c5f9911d34650768355573bc53e0b621760c4124 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index a13d8d50d7..05470a2115 100644 +index 775619331e..3a8aa44a73 100644 @@ -23 +24 @@ -@@ -1592,6 +1592,9 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set= ) +@@ -1523,6 +1523,9 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set= )