Re: [RFC PATCH] mm, page_alloc: avoid page_to_pfn() in move_freepages()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2019/11/27 19:47, Michal Hocko wrote:
> On Wed 27-11-19 18:28:00, Kefeng Wang wrote:
>> The start_pfn and end_pfn are already available in move_freepages_block(),
>> pfn_valid_within() should validate pfn first before touching the page,
>> or we might access an unitialized page with CONFIG_HOLES_IN_ZONE configs.
>>
>> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
>> Cc: Michal Hocko <mhocko@xxxxxxxx>
>> Cc: Vlastimil Babka <vbabka@xxxxxxx>
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
>> ---
>>
>> Here is an oops in 4.4(arm64 enabled CONFIG_HOLES_IN_ZONE),
> 
> Is this reproducible with the current upstream kernel? There were large
> changes in this aread since 4.4

Our inner tester found this oops twice, but couldn't be reproduced for now,
even in 4.4 kernel, still trying...

But the page_to_pfn() shouldn't be used in move_freepages(), right? ; )

> 
> Btw. the below should be part of the changelog.

Ok, will resend.

> 
>> Unable to handle kernel NULL pointer dereference at virtual address 00000000
>> pgd = ffffff8008f7e000
>> [00000000] *pgd=0000000017ffe003, *pud=0000000017ffe003, *pmd=0000000000000000
>> Internal error: Oops: 96000007 [#1] SMP
>> CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O    4.4.185 #1
>>
>> PC is at move_freepages+0x80/0x10c
>> LR is at move_freepages_block+0xd4/0xf4
>> pc : [<ffffff80083332e8>] lr : [<ffffff8008333448>] pstate: 80000085
>> [...]
>> [<ffffff80083332e8>] move_freepages+0x80/0x10c
>> [<ffffff8008333448>] move_freepages_block+0xd4/0xf4
>> [<ffffff8008335414>] __rmqueue+0x2bc/0x44c
>> [<ffffff800833580c>] get_page_from_freelist+0x268/0x600
>> [<ffffff8008335e84>] __alloc_pages_nodemask+0x184/0x88c
>> [<ffffff800837fae8>] new_slab+0xd0/0x494
>> [<ffffff8008381834>] ___slab_alloc.constprop.29+0x1c8/0x2e8
>> [<ffffff80083819a8>] __slab_alloc.constprop.28+0x54/0x84
>> [<ffffff8008381e68>] kmem_cache_alloc+0x64/0x198
>> [<ffffff80085b04e0>] __build_skb+0x44/0xa4
>> [<ffffff80085b06e4>] __netdev_alloc_skb+0xe4/0x134
>>
\





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux