From: KyongHo Cho <pullip.cho@samsung.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>
Subject: mm: fix faulty initialization in vmalloc_init()
Date: Fri, 25 May 2012 21:39:29 +0900 [thread overview]
Message-ID: <CAHQjnOMt112PkHPD1omBZ6ziPXk7E4crt3_Z5JhyxEMhccTsWQ@mail.gmail.com> (raw)
In-Reply-To: <20120524151231.e3a18ac5.akpm@linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 1981 bytes --]
On Fri, May 25, 2012 at 7:12 AM, Andrew Morton <akpm@linux-foundation.org>
wrote:
> On Thu, 24 May 2012 17:32:56 +0900
> KyongHo <pullip.cho@samsung.com> wrote:
>
>> vmalloc_init() adds 'vmap_area's for early 'vm_struct's.
>> This patch fixes vmalloc_init() to correctly initialize
>> vmap_area for the given vm_struct.
>>
>
> <daily message>
> Insufficient information. When fixing a bug please always always
> always describe the user-visible effects of the bug. Does the kernel
> instantly crash? Is it a comestic cleanliness thing which has no
> effect? Something in between? I have simply no idea, and am dependent
> upon you to tell me.
Sorry for unkind commit message :)
Why this patch is needed is described by Olav
in the previous replies.
>
>> --- 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?
>
>> va->va_start = (unsigned long)tmp->addr;
>> va->va_end = va->va_start + tmp->size;
>> + va->vm = tmp;
>
> OK, I can see how this might be important. But why did you find it
> necessary? Why was this change actually needed?
If it is not set, find_vm_area() with the early vm regions will always fail.
If the early vm regions must be neither found by find_vm_area()
nor removed by remove_vm_area(), va->vm must be NULL.
Please advise me what is right value for va->vm here :)
>
>> __insert_vmap_area(va);
>> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe
linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: Type: text/html, Size: 2619 bytes --]
prev parent reply other threads:[~2012-05-25 12:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 8:32 KyongHo
2012-05-24 22:12 ` Andrew Morton
2012-05-25 0:24 ` Olav Haugan
2012-05-25 11:12 ` KyongHo Cho
2012-05-25 12:39 ` KyongHo Cho [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=CAHQjnOMt112PkHPD1omBZ6ziPXk7E4crt3_Z5JhyxEMhccTsWQ@mail.gmail.com \
--to=pullip.cho@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-samsung-soc@vger.kernel.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