Re: [memcg BUG] unable to handle kernel NULL pointer derefence at 00000000

KAMEZAWA Hiroyuki
2008-10-21T11:14:15Z

On Tue, 21 Oct 2008 18:57:08 +0800
Li Zefan <lizf@cn.fujitsu.com> wrote:
>
> So I did this change, and the box booted up without any problem.

Li-san, could use send this patch as a fix ?
It seems alloc_node_page_cgrop() is too late in init-path to call alloc_bootmem().

Thanks,
-kame

>
> diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
> index 5d86550..82a30b1 100644
> --- a/mm/page_cgroup.c
> +++ b/mm/page_cgroup.c
> @@ -48,8 +48,7 @@ static int __init alloc_node_page_cgroup(int nid)
>
> table_size = sizeof(struct page_cgroup) * nr_pages;
>
> - base = __alloc_bootmem_node_nopanic(NODE_DATA(nid),
> - table_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS));
> + base = vmalloc_node(table_size, nid);
> if (!base)
> return -ENOMEM;
> for (index = 0; index < nr_pages; index++) {