From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id A7D93F04 for ; Fri, 21 Sep 2018 13:00:41 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180921110040euoutp012e83db08d773454635a1cace2386c837~WZT4u0RDB2133321333euoutp01b for ; Fri, 21 Sep 2018 11:00:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180921110040euoutp012e83db08d773454635a1cace2386c837~WZT4u0RDB2133321333euoutp01b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1537527640; bh=q/dZkWfWun+X74JJH6zYIXhTO5xUYktirZPknMTS62M=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=dI9IPBT9BqB3ecoqLpi1/B/pRQ7aDiDUUfnFp+l+FOa+cfw33D09eYMWXpncpqsr7 B0xvkLB9UIcsU+QFv7T4WFWkv/sd7YMmtpMtC3jMbAOG7a45WLsli9mGWbyqpfVPcv 2rqPKmc+PEuDCCsf1ghFK+uEZjoNq88We9g7a96c= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180921110039eucas1p2b4012c021ae88c52e243a35004e6a451~WZT4IQ79u1579315793eucas1p2M; Fri, 21 Sep 2018 11:00:39 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 75.64.04441.75FC4AB5; Fri, 21 Sep 2018 12:00:39 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20180921110038eucas1p1185f3275e6d99f285f44a299dd3b210d~WZT3JUk-I2589925899eucas1p12; Fri, 21 Sep 2018 11:00:38 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20180921110038eusmtrp272707a0509f6765e98073bc51ad50c69~WZT24glm92081220812eusmtrp2q; Fri, 21 Sep 2018 11:00:38 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-9b-5ba4cf572754 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 81.5C.04128.65FC4AB5; Fri, 21 Sep 2018 12:00:38 +0100 (BST) Received: from [106.109.129.180] (unknown [106.109.129.180]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20180921110038eusmtip12c5ce39a6e4bc8191b9e02615c422e98~WZT2doHfq3187831878eusmtip1A; Fri, 21 Sep 2018 11:00:38 +0000 (GMT) To: Anatoly Burakov , dev@dpdk.org Cc: solal.pirelli@gmail.com, stable@dpdk.org From: Ilya Maximets Date: Fri, 21 Sep 2018 14:02:37 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <2f0bea6a3860143bfbcf31142440a0e4db7c7933.1537521888.git.anatoly.burakov@intel.com> Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNKsWRmVeSWpSXmKPExsWy7djP87rh55dEGyxdJG/x6N5iZot3n7Yz WVxp/8lucWLqDBaLfx1/2B1YPX4tWMrqsXPWXXaPxXteMnn0bVnFGMASxWWTkpqTWZZapG+X wJUxr6GTqeAne8X8g1NYGxiXsnUxcnJICJhIrFl5DMjm4hASWMEo8frYJUaQhJDAF0aJF5eT IRKfGSUWrTrECNOx98YKZojEckaJo3N7GSGcj4wSq26tYQKpEhZwkNjdvp0FxBYRsJX4NP8O WJxZQEdixfNlYJPYgOxTq48A2RwcLAKqEoeP6IKERQUiJI48WAhWwisgKHFy5hOwMZwCCRJf n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BI8sqRpHU0uLc9NxiI73ixNzi0rx0veT83E2M wMjaduznlh2MXe+CDzEKcDAq8fAaLF4cLcSaWFZcmXuIUYKDWUmEd1/Xkmgh3pTEyqrUovz4 otKc1OJDjKZAv01klhJNzgdGfV5JvKGpobmFpaG5sbmxmYWSOO95g8ooIYH0xJLU7NTUgtQi mD4mDk6pBsaitGWLlh6bqJs0bSlbZPPv3umrFwv2F+690nHK2LB/asV62anZKTZvbZn5XWKY 4nkWmzMXCPqI3VbZVn3r5fGw9zv1wpg0QoxiHE8q/PxulDr1oQHXnDLbTysWSLyP1bp4nfvG a5HX/8+vD7hzwvOC4dHOZ6v39yzh1WVKs4jW4T0zt+rn31QlluKMREMt5qLiRADxH1/uwgIA AA== Message-Id: <20180921110038eucas1p1185f3275e6d99f285f44a299dd3b210d~WZT3JUk-I2589925899eucas1p12@eucas1p1.samsung.com> X-CMS-MailID: 20180921110038eucas1p1185f3275e6d99f285f44a299dd3b210d X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20180921092728epcas3p2c20347d79a6cebdd74ec8e5a1d17e14b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180921092728epcas3p2c20347d79a6cebdd74ec8e5a1d17e14b References: <7e4178219213303b982e505ae4cb4387d9d3814a.1537447684.git.anatoly.burakov@intel.com> <2f0bea6a3860143bfbcf31142440a0e4db7c7933.1537521888.git.anatoly.burakov@intel.com> Subject: Re: [dpdk-stable] [PATCH v3] mem: fix undefined behavior in NUMA code 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: Fri, 21 Sep 2018 11:00:41 -0000 On 21.09.2018 12:27, Anatoly Burakov wrote: > When NUMA-aware hugepages config option is set, we rely on > libnuma to tell the kernel to allocate hugepages on a specific > NUMA node. However, we allocate node mask before we check if > NUMA is available in the first place, which, according to > the manpage [1], causes undefined behaviour. > > Fix by only using nodemask when we have NUMA available. > > [1] https://linux.die.net/man/3/numa_alloc_onnode > > Bugzilla ID: 20 > > Fixes: 1b72605d2416 ("mem: balanced allocation of hugepages") > Cc: i.maximets@samsung.com > Cc: stable@dpdk.org > > Signed-off-by: Anatoly Burakov > --- > > Notes: > v3: > - Fix potential memory leak if socket-mem was not specified > > v2: > - Improve readability as per Ilya's comment > > lib/librte_eal/linuxapp/eal/eal_memory.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) LGTM, Acked-by: Ilya Maximets