Re: [Question] race condition in mm/page_alloc.c regarding page->lru?

From: Minchan Kim
Date: Fri Apr 02 2010 - 03:23:13 EST


On Fri, Apr 2, 2010 at 4:00 PM, TAO HU <tghk48@xxxxxxxxxxxx> wrote:
> Hi, kamezawa hiroyu
>
> Thanks for the hint!
>
> Hi, Minchan Kim
>
> Sorry. Not exactly sure your idea about <grep "page handling">.
> Below is a result of $ grep -n -r "list_del(&page->lru)" * in our src tree

It's not enough.
Maybe you have to review your's patches based on mainline.

>
> arch/s390/mm/pgtable.c:83: Â Â Âlist_del(&page->lru);
> arch/s390/mm/pgtable.c:226: Â Â Â Â Â Â list_del(&page->lru);
> arch/x86/mm/pgtable.c:60: Â Â Â list_del(&page->lru);
> drivers/xen/balloon.c:154: Â Â Âlist_del(&page->lru);
> drivers/virtio/virtio_balloon.c:143: Â Â Â Â Â Âlist_del(&page->lru);
> fs/cifs/file.c:1780: Â Â Â Â Â Âlist_del(&page->lru);
> fs/btrfs/extent_io.c:2584: Â Â Â Â Â Â Âlist_del(&page->lru);
> fs/mpage.c:388: Â Â Â Â list_del(&page->lru);
> include/linux/mm_inline.h:37: Â list_del(&page->lru);
> include/linux/mm_inline.h:47: Â list_del(&page->lru);
> kernel/kexec.c:391: Â Â Â Â Â Â list_del(&page->lru);
> kernel/kexec.c:711: Â Â Â Â Â Â Â Â Â Â list_del(&page->lru);
> mm/migrate.c:69: Â Â Â Â Â Â Â Âlist_del(&page->lru);
> mm/migrate.c:695: Â Â Â Â Â Â Â list_del(&page->lru);
> mm/hugetlb.c:467: Â Â Â Â Â Â Â Â Â Â Â list_del(&page->lru);
> mm/hugetlb.c:509: Â Â Â Â Â Â Â Â Â Â Â list_del(&page->lru);
> mm/hugetlb.c:836: Â Â Â Â Â Â Â list_del(&page->lru);
> mm/hugetlb.c:844: Â Â Â Â Â Â Â Â Â Â Â list_del(&page->lru);
> mm/hugetlb.c:900: Â Â Â Â Â Â Â Â Â Â Â list_del(&page->lru);
> mm/hugetlb.c:1130: Â Â Â Â Â Â Â Â Â Â Âlist_del(&page->lru);
> mm/hugetlb.c:1809: Â Â Â Â Â Â Âlist_del(&page->lru);
> mm/vmscan.c:597: Â Â Â Â Â Â Â Âlist_del(&page->lru);
> mm/vmscan.c:1148: Â Â Â Â Â Â Â Â Â Â Â list_del(&page->lru);
> mm/vmscan.c:1246: Â Â Â Â Â Â Â list_del(&page->lru);
> mm/slub.c:827: Âlist_del(&page->lru);
> mm/slub.c:1249: list_del(&page->lru);
> mm/slub.c:1263: Â Â Â Â list_del(&page->lru);
> mm/slub.c:2419: Â Â Â Â Â Â Â Â list_del(&page->lru);
> mm/slub.c:2809: Â Â Â Â Â Â Â Â Â Â Â Â list_del(&page->lru);
> mm/readahead.c:65: Â Â Â Â Â Â Âlist_del(&page->lru);
> mm/readahead.c:100: Â Â Â Â Â Â list_del(&page->lru);
> mm/page_alloc.c:532: Â Â Â Â Â Âlist_del(&page->lru);
> mm/page_alloc.c:679: Â Â Â Â Â Âlist_del(&page->lru);
> mm/page_alloc.c:741: Â Â Â Â Â Âlist_del(&page->lru);
> mm/page_alloc.c:820: Â Â Â Â Â Â Â Â Â Âlist_del(&page->lru);
> mm/page_alloc.c:1107: Â Â Â Â Â list_del(&page->lru);
> mm/page_alloc.c:4784: Â Â Â Â Â list_del(&page->lru);
>
There are normal caller.
I expected some bogus driver of out-of-mainline uses page directly
without enough review.

Is your kernel working well except this bug?
Do you see same oops call trace(about page-allocator) whenever kernel
panic happens?

I mean if something not page-allocadtor breaks memory, you can see
other symptoms. so we can doubt others(H/W, other subsystem).

--
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/