lkml.org 
[lkml]   [2010]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] radix-tree: fix radix_tree_prev_hole underflow case
Em 13-05-2010 23:15, Wu Fengguang escreveu:
> On Fri, May 14, 2010 at 10:05:24AM +0800, Cesar Eduardo Barros wrote:
>> radix_tree_prev_hole() used LONG_MAX to detect underflow; however,
>> ULONG_MAX is clearly what was intended, both here and by its only user
>> (count_history_pages at mm/readahead.c).
>
> Good catch, thanks! I actually have a more smart
> radix_tree_prev_hole() that uses ULONG_MAX.

I saw it already ([PATCH 14/16] radixtree: speed up the search for
hole), but it misses the LONG_MAX in the documentation comment.

> Andrew, fortunately this bug has little impact on readahead.

I agree, if I read it correctly it should only have any impact either
when very near LONG_MAX or in the unlikely case that there is no hole at
ULONG_MAX. And even then, the impact should be limited.

--
Cesar Eduardo Barros
cesarb@cesarb.net
cesar.barros@gmail.com


\
 
 \ /
  Last update: 2010-05-14 04:31    [W:0.044 / U:1.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site