From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 3CBD51B54E; Tue, 8 Jan 2019 17:46:31 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2019 08:46:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,454,1539673200"; d="scan'208";a="136436337" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 08 Jan 2019 08:46:29 -0800 Received: from sivswdev05.ir.intel.com (sivswdev05.ir.intel.com [10.243.17.64]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id x08GkT6X032265; Tue, 8 Jan 2019 16:46:29 GMT Received: from sivswdev05.ir.intel.com (localhost [127.0.0.1]) by sivswdev05.ir.intel.com with ESMTP id x08GkSB1002279; Tue, 8 Jan 2019 16:46:28 GMT Received: (from aburakov@localhost) by sivswdev05.ir.intel.com with LOCAL id x08GkSvn002275; Tue, 8 Jan 2019 16:46:28 GMT From: Anatoly Burakov To: dev@dpdk.org Cc: stable@dpdk.org Date: Tue, 8 Jan 2019 16:46:28 +0000 Message-Id: <7b4ee39eb515cfebabefd43c77294ee55ab8092d.1546964889.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-stable] [PATCH] memalloc: fix pointer dereferencing 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, 08 Jan 2019 16:46:31 -0000 The original code was supposed to overwrite the value pointed to by the pointer, but the new one is instead overwriting the pointer value itself, which has no effect outside that function. Fix it by adding a pointer dereference. Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal_memalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c index 60a0a680f..ccf268679 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c +++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c @@ -176,7 +176,7 @@ prepare_numa(int *oldpolicy, struct bitmask *oldmask, int socket_id) RTE_LOG(ERR, EAL, "Failed to get current mempolicy: %s. " "Assuming MPOL_DEFAULT.\n", strerror(errno)); - oldpolicy = MPOL_DEFAULT; + *oldpolicy = MPOL_DEFAULT; } RTE_LOG(DEBUG, EAL, "Setting policy MPOL_PREFERRED for socket %d\n", -- 2.17.1