linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: Cesar Eduardo Barros <cesarb@cesarb.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] radix-tree: fix radix_tree_prev_hole underflow case
Date: Fri, 14 May 2010 10:37:37 +0800	[thread overview]
Message-ID: <20100514023737.GB8695@localhost> (raw)
In-Reply-To: <4BECB562.2080200@cesarb.net>

On Fri, May 14, 2010 at 10:28:50AM +0800, Cesar Eduardo Barros wrote:
> 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.

Yes, thanks!

> > 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.

Right.

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

      reply	other threads:[~2010-05-14  2:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-14  2:05 [PATCH] radix-tree: fix radix_tree_prev_hole underflow case Cesar Eduardo Barros
2010-05-14  2:15 ` Wu Fengguang
2010-05-14  2:28   ` Cesar Eduardo Barros
2010-05-14  2:37     ` Wu Fengguang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100514023737.GB8695@localhost \
    --to=fengguang.wu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=cesarb@cesarb.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).