From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id 4AC321B854 for ; Tue, 15 May 2018 15:48:30 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id i14-v6so229220wre.2 for ; Tue, 15 May 2018 06:48:30 -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; bh=pRAfBJx3EL+g5j0Izp22fy8kd1yHCJSOPrQfwoKWfvs=; b=f+Nqp2remiJdiPhc9Q1f5c6N3sesNFGMkxZOTBphsQ/syh/98Xsjeh0iI3beDsz9pA uaWo8T4/gHyheHdjCMTWjYUCInxHO/oGf/kRKvfkepISZW6Ju9+cHpTNzjseHJY1kQqf GVL7l7OI06klTiRyJuVFfZH7Nl/yGurdONdLxYfnqa0JK+5bvic7TM378Yvpc7WxS/kS pgS7o3tl+BqjHiHilU9O0kjN5Fv7pGXq3trfNwcerxUWeX5vHjcLgP3ePfMqeMOl2Jw+ WvzQv2wQSTdIKC2JfUlQ3GeM615Lep/TEADmUfnLw10XYVv3g2eFPSrq+DFb0Ia7KDay nURw== 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; bh=pRAfBJx3EL+g5j0Izp22fy8kd1yHCJSOPrQfwoKWfvs=; b=ZCEA1YGxfdRl978bYCoKhtQFMHjJPTkcgGZmzMqP8g3EhW0tlpYWAoJrkZa6qQaC2V SyG4LBqP1BdT1fg4xvj1VewEHLL0XvvGRrTGNHn/hCXw92263Q6n0eH8qdbOkvWwOLYV +NI+IqLo5qdh+f3yt4mMBYDFevB8eYg1ahMoEbhxoXOrbOYWVsVWewZsnsACivuu322O tJrV/0LzKhDaFLvAY44LWBCEOxRd4IOsOl4sbeXB8wEFAE2O/IBS8uL9p8k8wVuRQhAQ yIcMvCsyx4DrWs0b7h8ZFtsUcpXurXnaW5rMpCUNqSCE/h/Ion5d4N8CW5MZN33rzPr2 NRkQ== X-Gm-Message-State: ALKqPwfBLMfTX9poHrw9Of7k9+5ryKo/0+or63dWlFMUnM9OobaLjiJI WbWXKsuusxs3VaUMi2uUTHv/fvqo X-Google-Smtp-Source: AB8JxZqhX04GqTqPbGxE4N7jJkajSUcF9/HrfhjD3WVdkZXQ/rIkLPp5ITQoEfUcHsNzApI4GT8eKQ== X-Received: by 2002:adf:a970:: with SMTP id u103-v6mr10107669wrc.71.1526392110040; Tue, 15 May 2018 06:48:30 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id c27-v6sm102512wrg.75.2018.05.15.06.48.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 06:48:29 -0700 (PDT) From: luca.boccassi@gmail.com To: Ivan Malov Cc: Andrew Rybchenko , Santosh Shukla , dpdk stable Date: Tue, 15 May 2018 14:46:39 +0100 Message-Id: <20180515134731.9337-28-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180515134731.9337-1-luca.boccassi@gmail.com> References: <20180503110612.12146-2-luca.boccassi@gmail.com> <20180515134731.9337-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'eal: fix mempool ops name parsing' has been queued to stable release 18.02.2 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: , X-List-Received-Date: Tue, 15 May 2018 13:48:30 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/16/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From d5b8f05cc5caa97719729e5f3e90423d9f4c85e3 Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Fri, 4 May 2018 11:31:54 +0100 Subject: [PATCH] eal: fix mempool ops name parsing [ upstream commit 33b318179162e4be81720d010fa6466fe03c2a84 ] The code aimed to pick and remember the value of mempool ops name from EAL command line arguments does not copy the string and remembers the pointer provided by getopt_long() directly. The latter could be clobbered later and result in reading wrong mbuf pool ops name by rte_mempool library. Typically, this flaw could be avoided by using strdup() to remember the string value of the option. Fixes: a103a97e7191 ("eal: allow user to override default mempool driver") Signed-off-by: Ivan Malov Signed-off-by: Andrew Rybchenko Acked-by: Santosh Shukla --- lib/librte_eal/bsdapp/eal/eal.c | 3 ++- lib/librte_eal/linuxapp/eal/eal.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index b1b8f7600..216796e87 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -380,7 +380,8 @@ eal_parse_args(int argc, char **argv) switch (opt) { case OPT_MBUF_POOL_OPS_NAME_NUM: - internal_config.user_mbuf_pool_ops_name = optarg; + internal_config.user_mbuf_pool_ops_name = + strdup(optarg); break; case 'h': eal_usage(prgname); diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 38306bf5c..fd48471de 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -591,7 +591,8 @@ eal_parse_args(int argc, char **argv) break; case OPT_MBUF_POOL_OPS_NAME_NUM: - internal_config.user_mbuf_pool_ops_name = optarg; + internal_config.user_mbuf_pool_ops_name = + strdup(optarg); break; default: -- 2.14.2