lkml.org 
[lkml]   [2012]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mm: fix faulty initialization in vmalloc_init()
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.

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

> __insert_vmap_area(va);
> }



\
 
 \ /
  Last update: 2012-05-25 00:41    [W:0.162 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site