From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Hugh Dickins <hughd@google.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Shaohua Li <shaohua.li@intel.com>
Subject: Re: [PATCH] mm: simplify find_vma_prev
Date: Fri, 09 Dec 2011 15:44:53 -0500 [thread overview]
Message-ID: <4EE27345.90003@gmail.com> (raw)
In-Reply-To: <20111209122406.11f9e31a.akpm@linux-foundation.org>
> This changes the (undocumented, naturally) interface in disturbing ways.
>
> Currently, *pprev will always be written to. With this change, *pprev
> will only be written to if find_vma_prev() returns non-NULL.
>
> Looking through the code, this is mostly benign. But it will cause the
> CONFIG_STACK_GROWSUP version of find_extend_vma() to use an
> uninitialised stack slot in ways which surely will crash the kernel.
Weird.
> So please have a think about that and fix it up. And please add
> documentation for find_vma_prev()'s interface so we don't break it next
> time.
Sure thing. Thank you for good spotting!
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Hugh Dickins <hughd@google.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Shaohua Li <shaohua.li@intel.com>
Subject: Re: [PATCH] mm: simplify find_vma_prev
Date: Fri, 09 Dec 2011 15:44:53 -0500 [thread overview]
Message-ID: <4EE27345.90003@gmail.com> (raw)
In-Reply-To: <20111209122406.11f9e31a.akpm@linux-foundation.org>
> This changes the (undocumented, naturally) interface in disturbing ways.
>
> Currently, *pprev will always be written to. With this change, *pprev
> will only be written to if find_vma_prev() returns non-NULL.
>
> Looking through the code, this is mostly benign. But it will cause the
> CONFIG_STACK_GROWSUP version of find_extend_vma() to use an
> uninitialised stack slot in ways which surely will crash the kernel.
Weird.
> So please have a think about that and fix it up. And please add
> documentation for find_vma_prev()'s interface so we don't break it next
> time.
Sure thing. Thank you for good spotting!
next prev parent reply other threads:[~2011-12-09 20:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-09 20:09 [PATCH] mm: simplify find_vma_prev kosaki.motohiro
2011-12-09 20:09 ` kosaki.motohiro
2011-12-09 20:24 ` Andrew Morton
2011-12-09 20:24 ` Andrew Morton
2011-12-09 20:44 ` KOSAKI Motohiro [this message]
2011-12-09 20:44 ` KOSAKI Motohiro
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=4EE27345.90003@gmail.com \
--to=kosaki.motohiro@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shaohua.li@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.