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 7C2ECA051C for ; Tue, 11 Feb 2020 12:40:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6AD6F1BFA7; Tue, 11 Feb 2020 12:40:31 +0100 (CET) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 191D31BFAD for ; Tue, 11 Feb 2020 12:40:30 +0100 (CET) Received: by mail-wm1-f66.google.com with SMTP id a6so3137230wme.2 for ; Tue, 11 Feb 2020 03:40:30 -0800 (PST) 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=nWp4v7mu42gok6obSiGjjf6o+yDdzBpgR3KeK5zOwus=; b=PxJS68YOBjVkyTqLO9z9u6RR4E6ALAMhBXYcoKq124NXVCVGAMoCwMUX5KxMVd9WUs BRuFw18v1VKWVMvIj8qY6l/EjN3q1L+s2ezqyC3ncKt5a4OenOUOYkqqam+D6rxNmqnM nD8UMvelrFDBaakz6Sik4vEfbpxth6TvyyBFyj5N9f4pMVq2W2NKbze0qIpLO10q2+J+ saAuXSu59hEc2rd3LA2zkCoEJuDopc/xNlMiiZ0zhmrJjRiM3PgMf+BxZmKVtwxcJN2U pdzS+TjojfAQ7WmlAfd/CWvTIFO5IsAKWRjziH7R8w06FaxWdYwiyxM6FveCaloROxXY QU7A== 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=nWp4v7mu42gok6obSiGjjf6o+yDdzBpgR3KeK5zOwus=; b=OD9cYGpdJqmOsPTNDihqgZZfaRnt+6392o5DO79Q7pWjGDeqru9g4mHarL5IVbhGu5 Fm+YBtvEBMtMw9pRBSNKZ9SIo9RN+GMt0jgU+u9fFpk2uT2scOHoD3h1L8wusBFDPC/O b+PdRjIG5Bm0XVzfVO5O75sk4r3rNoZrMVu3lNBQlFjjoQ5u5b30Vp4F3RNYQlE+uOx1 6UHA1ZKZBNhxbChqt2/V07n/pWd6HK2K3UwPNbN401kscdTbnS+Zeh1iRB3SE21t+n2n kiFgAEafh8lFbwhHqSget6oYD3b22tNVsNmyxlC30WJCL/lZ2+VNW3biDRpkHleXLRxJ h2SA== X-Gm-Message-State: APjAAAVaamk0ZPne6K+2xhRJ+Od6VM7rzMZKH1Wy7hFh2Pw5uLpYPrPG zBns9agf1lSlyvFMKOOIORoeUKuk49c= X-Google-Smtp-Source: APXvYqz92gAfUX6smPtu94sam7XPxzqmaVFKrb6s6OQND7Sz/QKL/MspEbfYyJrX980AqdQTgjFIKA== X-Received: by 2002:a1c:491:: with SMTP id 139mr5276014wme.117.1581421229605; Tue, 11 Feb 2020 03:40:29 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id t9sm5088193wrv.63.2020.02.11.03.40.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:40:28 -0800 (PST) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Ferruh Yigit , dpdk stable Date: Tue, 11 Feb 2020 11:21:27 +0000 Message-Id: <20200211112216.3929-141-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/tap: fix memory leak when unregister intr handler' has been queued to stable release 19.11.1 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 stable release 19.11.1 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/13/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 rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 6ea30d320353c3d1e047f59847928296db15acce 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 a13d8d50d7..05470a2115 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -1591,8 +1591,11 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set) int err; err = tap_lsc_intr_handle_set(dev, set); - if (err) + if (err < 0) { + if (!set) + tap_rx_intr_vec_set(dev, 0); return err; + } err = tap_rx_intr_vec_set(dev, set); if (err && set) tap_lsc_intr_handle_set(dev, 0); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:43.557789119 +0000 +++ 0141-net-tap-fix-memory-leak-when-unregister-intr-handler.patch 2020-02-11 11:17:38.652006059 +0000 @@ -1,14 +1,15 @@ -From c5f9911d34650768355573bc53e0b621760c4124 Mon Sep 17 00:00:00 2001 +From 6ea30d320353c3d1e047f59847928296db15acce 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") -Cc: stable@dpdk.org Signed-off-by: Yunjian Wang Acked-by: Ferruh Yigit