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

Li Zefan
2008-10-21T07:04:15Z

KAMEZAWA Hiroyuki wrote:
> On Tue, 21 Oct 2008 14:20:27 +0800
> Li Zefan <lizf@cn.fujitsu.com> wrote:
>
>>> BTW, "allocate all page_cgroup at boot" patch goes to Linus' git. Wow.
>>>
>> But seems this patch causes kernel panic at system boot ... (or maybe one of other
>> memcg patches?)
>>
>> I wrote down the panic manually:
>>
>> BUG: unable to handle kernel NULL pointer dereference at 00000000
>> IP: page_cgroup_zoneinfo + 0xa
>>
>> Call Trace:
>> ? mem_cgroup_charge_common + 0x17d
>> ? mem_cgroup_charge
>> ? add_to_page_cache_locked
>> ? add_to_page_cache_lru
>> ? find_or_create_page
>> ? __getblk
>> ? ext3_get_inode_loc
>> ? ext3_iget
>> ? ext3_lookup
>>
>> Tell me if you need extra information.
>>
> Hmm, it's curious but page_cgroup->page seems to be NULL...
> Could you show disassemble code of page_cgroup_zoneinfo() ?
>

You mean this ?

000881c8 <page_cgroup_zoneinfo>:
881c8: 55 push %ebp
881c9: 8b 50 04 mov 0x4(%eax),%edx
881cc: 8b 40 08 mov 0x8(%eax),%eax
881cf: 89 e5 mov %esp,%ebp
881d1: 5d pop %ebp
881d2: 8b 00 mov (%eax),%eax
881d4: c1 e8 1e shr $0x1e,%eax
881d7: 6b c0 58 imul $0x58,%eax,%eax
881da: 03 42 48 add 0x48(%edx),%eax
881dd: c3 ret

> BTW, this happens always ?
>

Sometimes just freezed, and sometimes panic. It never boots successfully.