From: Hugh Dickins <hugh.dickins@tiscali.co.uk>
To: Tony Perkins <da.perk@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
linux-mm@kvack.org
Subject: Re: Bug in find_vma_prev - mmap.c
Date: Sun, 31 Jan 2010 20:03:16 +0000 (GMT) [thread overview]
Message-ID: <alpine.LSU.2.00.1001311955510.6227@sister.anvils> (raw)
In-Reply-To: <6cafb0f01001311056k3c6a882fla42b714256bb1e6d@mail.gmail.com>
On Sun, 31 Jan 2010, Tony Perkins wrote:
>
> Say for instance, that addr is not in the list (but is greater than
> the last element).
Before, you appeared to be talking about a discrepancy with the first
vma; now you're talking about a discrepancy with the last vma?
Or a discrepancy when the first vma is the last vma?
> find_vma_prev will return the last node in the list, whereas find_vma
> will return NULL.
I'd expect find_vma_prev to return prev->vm_next, which would be NULL.
>
> It seems that it is just inconsistent, in what it should return
> regarding the two.
> For instance, find_vma_prev will never return NULL, if there's at
> least one node within the tree, whereas find_vma would.
> find_extend_vma uses find_vma_prev and checks to see if it returns
> NULL and is less than the return address (which would always be the
> case).
Are we disagreeing about our readings of the code, or have you seen a
problem in practice?
I admit I've not tried running this, injecting addresses into find_vma_prev
and printk'ing the result; but I'm missing what leads you to say that
find_vma_prev will never return NULL.
Hugh
--
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>
prev parent reply other threads:[~2010-01-31 20:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6cafb0f01001291657q4ccbee86rce3143a4be7a1433@mail.gmail.com>
2010-01-30 18:29 ` Rafael J. Wysocki
2010-01-31 16:25 ` Hugh Dickins
2010-01-31 18:56 ` Tony Perkins
2010-01-31 20:03 ` Hugh Dickins [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=alpine.LSU.2.00.1001311955510.6227@sister.anvils \
--to=hugh.dickins@tiscali.co.uk \
--cc=akpm@linux-foundation.org \
--cc=da.perk@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rjw@sisk.pl \
/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