From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 699751BC3F; Mon, 14 May 2018 01:07:51 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E233E247F1; Sun, 13 May 2018 19:07:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 13 May 2018 19:07:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=cm+zD8bOyJcXRf4DH38yux/tCf eEitcYfN/wdAXKN6s=; b=oIWVh+wgSDIGYZnBw95KMBr8ObZiZ5CvndKyUq2dnb WE/o7q8zFLqJZrNkZZXIrIrCyI9jStppT0cSGn0u/cmt2q+5TuDbK6syu8iBwkRE 86gm2P1Jv+rHFR5cbGY9SXo51lBxF51cOWAFpk+9hXCcTn4PecGzRHtwlkImg67x A= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=cm+zD8 bOyJcXRf4DH38yux/tCfeEitcYfN/wdAXKN6s=; b=WxwZA4bELYFYvFFd5vEA1B w4PzJ66UKxrBeV29cDfRK1abYeMpW+b4X5xsUIAR4OuOFULGnCyTuv2FUZk4SiHq ob2fuo9NTH9Pg1qqSVNmwqzPxVJYHqGCczF7he3nH5XkByqaqnDkMKzUX5rXZPJT FimY6e+XJVxqb6gIVX4VS2b8rcMt5m46UEErzQlU9b00PW1DxeIz74cWcn7fsI7A rP3vf5MXycw7jyGU8GvLgMd3smz5qP26tJ+TE0yBHo1cQ7mrs/onRZG1aWUXqP+c J5CZ7+T+1+pCKyy3EhRJn/7wtPKMP2mXnUQXUrq03uqSLyouehdJo03YZaIkPFTg == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1272DE4123; Sun, 13 May 2018 19:07:49 -0400 (EDT) From: Thomas Monjalon To: Andrew Rybchenko , Ivan Malov Cc: dev@dpdk.org, santosh , stable@dpdk.org Date: Mon, 14 May 2018 01:07:48 +0200 Message-ID: <7636615.bGWiXIQp7Z@xps> In-Reply-To: <146d5ea9-793b-9bbc-0d20-9375cf2d3907@caviumnetworks.com> References: <1525429914-18409-1-git-send-email-arybchenko@solarflare.com> <146d5ea9-793b-9bbc-0d20-9375cf2d3907@caviumnetworks.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] eal: copy optarg when parsing mempool ops name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2018 23:07:51 -0000 07/05/2018 07:42, santosh: > > On Friday 04 May 2018 04:01 PM, Andrew Rybchenko wrote: > > From: Ivan Malov > > > > 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") > > Cc: Santosh Shukla > > Cc: stable@dpdk.org > > > > Signed-off-by: Ivan Malov > > Signed-off-by: Andrew Rybchenko > > --- > > Acked-by: Santosh Shukla Applied, thanks