[dpdk-dev] [PATCH v2] test/timer: fix memzone reserve failure check
Min Hu (Connor)
humin29 at huawei.com
Tue May 11 02:53:42 CEST 2021
在 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 at dpdk.org
>>
>> Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
> [...]
>> - 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.
>
>
> .
>
More information about the dev
mailing list