From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f176.google.com (mail-qk0-f176.google.com [209.85.220.176]) by dpdk.org (Postfix) with ESMTP id B112B690F for ; Tue, 20 Sep 2016 13:16:49 +0200 (CEST) Received: by mail-qk0-f176.google.com with SMTP id w204so11275001qka.0 for ; Tue, 20 Sep 2016 04:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightcyber-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fC6WT4RBq8aL6GlRlvKW2M2KXZ0vCPZCdanF31BaIDI=; b=ybhX8/Jf3JjQlE3VatQcXnz8uodPNdP73TtroTNxJhyDbY6kymqfQXRDCE3tSCyO4p +txrt+4lD/8GwXiZXQKMuRt1JJLoXJw7iNEKYc6igvcZoATXhrwoldga98K5V/VsLyU2 gHVY85WtZrbPTmbu/jYiAuqzF8QlxWsVtH2MiumnPG2H5ldhpndpgnf8k8wW/vDx82Z9 btFtR2fs/XEt5KRzsD2Z+3hYG1Pe1ar2wiDOPHfskjmElViaPnqCpMITQ38RiA420zGv GZN3MpEmY+5IPcW8VyLifSXQZRXyMFAp3VwrBOkxPUe0zig5w9Sm8EFTYPrD0D77d3cB cIDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fC6WT4RBq8aL6GlRlvKW2M2KXZ0vCPZCdanF31BaIDI=; b=N10+Aw8pd7JjqVBE6wfzWwP97cH4/p4cYDC1QhgeTnDmSHy3MhsYovjNRxSwSvNQz/ 2d/3cHN+P/fXW5LlZ0BI1CZ2n4GMN4jlMzuSGnzxN3egDLSTygW6PbeWYMGJ9FyVa2v4 35G+yWc9nkDUch/vhvJ2sGJPVIVHpSirlgV2nihpsag5OWQyGNpnL/VHgHTWzRyNA/81 TFV4C7PISqlmceLMMTAavJoxKyl8m83lpJv8x0d+XR2m0lXf8pcR3F/AfJgd7Av+o8/f FlIEAJ9eRw4x0qCrahqPxjCmxsp8OTOn+Ijy8zipClGamdTFPGTrtCsKe+alnYHfmAGQ d5Jw== X-Gm-Message-State: AE9vXwMA4GiHi9RX4GyYjDV1L7EMDKO1hwe7qVup74rGw2JfKeZtjGI/acZcqPGj8AdOowZh4ocNOWX1EYDv/g== X-Received: by 10.55.212.10 with SMTP id l10mr34976815qki.268.1474370209210; Tue, 20 Sep 2016 04:16:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.101.21 with HTTP; Tue, 20 Sep 2016 04:16:48 -0700 (PDT) In-Reply-To: <20160920105829.GU23158@yliu-dev.sh.intel.com> References: <1474367963-83879-1-git-send-email-dror.birkman@lightcyber.com> <20160920105829.GU23158@yliu-dev.sh.intel.com> From: Dror Birkman Date: Tue, 20 Sep 2016 14:16:48 +0300 Message-ID: To: Yuanhan Liu Cc: Nicolas Pernas Maradei , ferruh.yigit@intel.com, dev@dpdk.org, stable@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] pcap: fix memory leak in jumbo frames X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 11:16:50 -0000 Cool! Adding fixline: If rte_pktmbuf_alloc() fails on any segment that is not the initial segment, previously allocated mbufs are not freed. Fixes: 6db141c91e1f ("pcap: support jumbo frames") Signed-off-by: Dror Birkman --- drivers/net/pcap/rte_eth_pcap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_ pcap.c index b7a3b03..db19a66 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -229,8 +229,10 @@ eth_pcap_rx(void *queue, if (unlikely(eth_pcap_rx_jumbo(pcap_q->mb_pool, mbuf, packet, - header.caplen) == -1)) + header.caplen) == -1)) { + rte_pktmbuf_free(mbuf); break; + } } mbuf->pkt_len = (uint16_t)header.caplen; -- 2.3.0 On Tue, Sep 20, 2016 at 1:58 PM, Yuanhan Liu wrote: > On Tue, Sep 20, 2016 at 01:39:23PM +0300, Dror Birkman wrote: > > If rte_pktmbuf_alloc() fails on any segment that is not the initial > > segment, previously allocated mbufs are not freed. > > You should put a "fixline" here. > > Besides that, I think it's a good candidate for stable branch. Thus, > stable@dpdk.org cc'ed. > > --yliu >