Re: [PATCH for v4.6] lib/stackdepot: avoid to return 0 handle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2016-05-04 17:34 GMT+09:00 Alexander Potapenko <glider@xxxxxxxxxx>:
> On Tue, May 3, 2016 at 7:13 AM,  <js1304@xxxxxxxxx> wrote:
>> From: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>
>>
>> Recently, we allow to save the stacktrace whose hashed value is 0.
>> It causes the problem that stackdepot could return 0 even if in success.
>> User of stackdepot cannot distinguish whether it is success or not so we
>> need to solve this problem. In this patch, 1 bit are added to handle
>> and make valid handle none 0 by setting this bit. After that, valid handle
>> will not be 0 and 0 handle will represent failure correctly.
> Returning success or failure doesn't require a special bit, we can
> just make depot_alloc_stack() return a boolean value.
> If I'm understanding correctly, your primary intention is to reserve
> an invalid handle value that will never collide with valid handles
> returned in the future.
> Can you reflect this in the description?

Indeed. I will add it in the description and respin the patch.

Thanks.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]