From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 377CAA0C45; Tue, 11 May 2021 02:53:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5192F40140; Tue, 11 May 2021 02:53:52 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 447484003C for ; Tue, 11 May 2021 02:53:50 +0200 (CEST) Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FfK8f4yLwzqTX2; Tue, 11 May 2021 08:50:26 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.498.0; Tue, 11 May 2021 08:53:42 +0800 To: Thomas Monjalon CC: , , , References: <1619083120-57343-1-git-send-email-humin29@huawei.com> <1620090469-30484-1-git-send-email-humin29@huawei.com> <9479806.yrmItbF8Ka@thomas> From: "Min Hu (Connor)" Message-ID: <767344ce-6f98-f66a-d05b-55647c5b2d93@huawei.com> Date: Tue, 11 May 2021 08:53:42 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <9479806.yrmItbF8Ka@thomas> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH v2] test/timer: fix memzone reserve failure check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" ÔÚ 2021/5/10 22:13, Thomas Monjalon дµÀ: > 04/05/2021 03:07, Min Hu (Connor): >> Segmentation fault may occur without checking if memzone >> reserves succeed or not. > > The sentence is confusing. Please try to make it more logical. > Something like "It was potentially dereferencing a null pointer. > It is fixed by checking the pointer before dereferencing." > >> >> This patch fixed it. >> >> Fixes: 50247fe03fe0 ("test/timer: exercise new APIs in secondary process") >> Cc: stable@dpdk.org >> >> Signed-off-by: Min Hu (Connor) > [...] >> - test_info = mz->addr; >> - TEST_ASSERT_NOT_NULL(test_info, "Couldn't allocate memory for " >> + TEST_ASSERT_NOT_NULL(mz, "Couldn't allocate memory for " >> "test data"); > > Error messages should not be split. I makes search difficult. > Please fix it in this patch while touching this line. > Fixed in v3, thanks. > > > . >