From: ohaugan@codeaurora.org (Olav Haugan)
To: linux-arm-kernel@lists.infradead.org
Subject: mm: fix faulty initialization in vmalloc_init()
Date: Thu, 24 May 2012 17:24:01 -0700 [thread overview]
Message-ID: <002c01cd3a0c$aef39530$0cdabf90$@codeaurora.org> (raw)
In-Reply-To: <20120524151231.e3a18ac5.akpm@linux-foundation.org>
> -----Original Message-----
> On Thu, 24 May 2012 17:32:56 +0900
> KyongHo <pullip.cho@samsung.com> wrote:
>
> > --- a/mm/vmalloc.c
> > +++ b/mm/vmalloc.c
> > @@ -1185,9 +1185,10 @@ void __init vmalloc_init(void)
> > /* Import existing vmlist entries. */
> > for (tmp = vmlist; tmp; tmp = tmp->next) {
> > va = kzalloc(sizeof(struct vmap_area), GFP_NOWAIT);
> - va->flags = tmp->flags | VM_VM_AREA;
> > + va->flags = VM_VM_AREA;
>
> This change is a mystery. Why do we no longer transfer ->flags?
I was actually debugging the same exact issue today. This transfer of flags
actually causes some of the static mapping virtual addresses to be
prematurely freed (before the mapping is removed) because VM_LAZY_FREE gets
"set" if tmp->flags has VM_IOREMAP set. This might cause subsequent
vmalloc/ioremap calls to fail because it might allocate one of the freed
virtual address ranges that aren't unmapped.
--
Olav Haugan
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2012-05-25 0:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 8:32 mm: fix faulty initialization in vmalloc_init() KyongHo
2012-05-24 22:12 ` Andrew Morton
2012-05-25 0:24 ` Olav Haugan [this message]
2012-05-25 11:12 ` KyongHo Cho
2012-05-25 12:39 ` KyongHo Cho
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='002c01cd3a0c$aef39530$0cdabf90$@codeaurora.org' \
--to=ohaugan@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.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).