Re: [PATCH -v2] rmap: make anon_vma_prepare link in all the anon_vmas of a mergeable VMA

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Borislav Petkov
Date: Monday, April 12, 2010 - 12:20 am

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun, Apr 11, 2010 at 06:04:39PM -0700


Haa, I think you're gonna want to improve them :)

	WARN_ONCE(1, "page->mapping does not exist in vma chain");

triggered on the first resume showing a rather messy 4 WARN_ONCEs. Had I
more cores, there maybe would've been more of them :) Maybe need locking
if clean output is of interest (see below).

So, anyway, if I can read this correctly, there is a page->mapping
anon_vma which is _not_ in the anon_vmas chain of the vma
(avc->same_vma).

And the spot we oops on is in page_referenced_anon():

	list_for_each_entry(avc, &anon_vma->head, same_anon_vma) {

which is actually where we iterate over all vmas associated with this
anon_vma.

So if that previous anon_vma pointed to by the page_mapping has been
falsely unlinked at some point, no wonder we boom on that later.

By the way, I completely understand when you say that your head hurts
from looking at this :).


[  486.580872] Restarting tasks ... done.
[  494.167242] [drm] Resetting GPU
[  495.422354] ------------[ cut here ]------------
[  495.422407] WARNING: at mm/memory.c:909 unmap_vmas+0x548/0xa29()
[  495.422442] Hardware name: System Product Name
[  495.422474] page->mapping does not exist in vma chain
[  495.422504] Modules linked in:
[  495.422545] ------------[ cut here ]------------
[  495.422555] ------------[ cut here ]------------
[  495.422565]  powernow_k8
[  495.422583] WARNING: at mm/memory.c:909 unmap_vmas+0x548/0xa29()
[  495.422591]  cpufreq_ondemand
[  495.422597] Hardware name: System Product Name
[  495.422602] page->mapping does not exist in vma chain cpufreq_powersave
[  495.422612] Modules linked in: cpufreq_userspace powernow_k8 cpufreq_ondemand cpufreq_powersave cpufreq_userspace freq_table freq_table cpufreq_conservative cpufreq_conservative binfmt_misc binfmt_misc kvm_amd kvm ipv6 vfat fat dm_crypt kvm_amd dm_mod 8250_pnp kvm 8250 serial_core edac_core pcspkr k10temp ohci_hcd
[  495.422676]  ipv6Pid: 2919, comm: udevd Tainted: G        W  2.6.34-rc3-00506-g6c62fe4 #1
[  495.422689] Call Trace:
[  495.422694]  vfat
[  495.422700] ------------[ cut here ]------------
[  495.422721] WARNING: at mm/memory.c:909 unmap_vmas+0x548/0xa29()
[  495.422729]  fat [<ffffffff81038fe0>] warn_slowpath_common+0x7c/0x94
[  495.422746]  dm_crypt
[  495.422751] Hardware name: System Product Name
[  495.422758]  dm_modpage->mapping does not exist in vma chain
[  495.422767] Modules linked in: 8250_pnp [<ffffffff8103904f>] warn_slowpath_fmt+0x41/0x43
[  495.422784]  powernow_k8 cpufreq_ondemand 8250 cpufreq_powersave [<ffffffff810bcd20>] unmap_vmas+0x548/0xa29
[  495.422807]  serial_core cpufreq_userspace [<ffffffff810bd021>] ? unmap_vmas+0x849/0xa29
[  495.422828]  edac_core freq_table pcspkr cpufreq_conservative [<ffffffff810c17d8>] exit_mmap+0x102/0x1e4
[  495.422851]  binfmt_misc [<ffffffff810c173f>] ? exit_mmap+0x69/0x1e4
[  495.422863]  k10temp [<ffffffff810368bc>] mmput+0x48/0xb9
[  495.422876]  kvm_amd [<ffffffff8103ad90>] exit_mm+0x110/0x11d
[  495.422889]  ohci_hcd kvm
[  495.422903]  [<ffffffff8103c9e6>] do_exit+0x1c5/0x6e5
[  495.422909]  ipv6Pid: 2916, comm: udevd Tainted: G        W  2.6.34-rc3-00506-g6c62fe4 #1
[  495.422927]  [<ffffffff81065387>] ? trace_hardirqs_off_caller+0x1f/0xa9
[  495.422934] Call Trace:
[  495.422940]  vfat [<ffffffff8141016d>] ? retint_swapgs+0xe/0x13
[  495.422956]  fat [<ffffffff81038fe0>] warn_slowpath_common+0x7c/0x94
[  495.422972]  dm_crypt dm_mod 8250_pnp [<ffffffff8103cf8a>] do_group_exit+0x84/0xb0
[  495.422989]  8250 serial_core [<ffffffff8103cfcd>] sys_exit_group+0x17/0x1b
[  495.423013]  [<ffffffff8100221b>] system_call_fastpath+0x16/0x1b
[  495.423019]  edac_core
[  495.423025] ---[ end trace d9664ac54d1edb0e ]---
[  495.423031]  pcspkr k10temp ohci_hcd
[  495.423043] Pid: 2914, comm: udevd Tainted: G        W  2.6.34-rc3-00506-g6c62fe4 #1
[  495.423055]  [<ffffffff8103904f>] warn_slowpath_fmt+0x41/0x43
[  495.423063] Call Trace:
[  495.423073]  [<ffffffff810bcd20>] unmap_vmas+0x548/0xa29
[  495.423087]  [<ffffffff81038fe0>] warn_slowpath_common+0x7c/0x94
[  495.423100]  [<ffffffff810bd021>] ? unmap_vmas+0x849/0xa29
[  495.423111]  [<ffffffff8103904f>] warn_slowpath_fmt+0x41/0x43
[  495.423123]  [<ffffffff810bcd20>] unmap_vmas+0x548/0xa29
[  495.423134]  [<ffffffff810bd021>] ? unmap_vmas+0x849/0xa29
[  495.423147]  [<ffffffff810c17d8>] exit_mmap+0x102/0x1e4
[  495.423159]  [<ffffffff810c17d8>] exit_mmap+0x102/0x1e4
[  495.423172]  [<ffffffff810c173f>] ? exit_mmap+0x69/0x1e4
[  495.423184]  [<ffffffff810c173f>] ? exit_mmap+0x69/0x1e4
[  495.423194]  [<ffffffff810368bc>] mmput+0x48/0xb9
[  495.423204]  [<ffffffff810368bc>] mmput+0x48/0xb9
[  495.423214]  [<ffffffff8103ad90>] exit_mm+0x110/0x11d
[  495.423225]  [<ffffffff8103ad90>] exit_mm+0x110/0x11d
[  495.423236]  [<ffffffff8103c9e6>] do_exit+0x1c5/0x6e5
[  495.423246]  [<ffffffff8103c9e6>] do_exit+0x1c5/0x6e5
[  495.423266]  [<ffffffff81065387>] ? trace_hardirqs_off_caller+0x1f/0xa9
[  495.423277]  [<ffffffff81065387>] ? trace_hardirqs_off_caller+0x1f/0xa9
[  495.423292]  [<ffffffff8141016d>] ? retint_swapgs+0xe/0x13
[  495.423303]  [<ffffffff8141016d>] ? retint_swapgs+0xe/0x13
[  495.423315]  [<ffffffff8103cf8a>] do_group_exit+0x84/0xb0
[  495.423325]  [<ffffffff8103cfcd>] sys_exit_group+0x17/0x1b
[  495.423334]  [<ffffffff8103cf8a>] do_group_exit+0x84/0xb0
[  495.423346]  [<ffffffff8100221b>] system_call_fastpath+0x16/0x1b
[  495.423357]  [<ffffffff8103cfcd>] sys_exit_group+0x17/0x1b
[  495.423365] ---[ end trace d9664ac54d1edb0f ]---
[  495.423386]  [<ffffffff8100221b>] system_call_fastpath+0x16/0x1b
[  495.423402] ---[ end trace d9664ac54d1edb10 ]---
[  495.424191] WARNING: at mm/memory.c:909 unmap_vmas+0x548/0xa29()
[  495.424215] Hardware name: System Product Name
[  495.424238] page->mapping does not exist in vma chain
[  495.424259] Modules linked in: powernow_k8 cpufreq_ondemand cpufreq_powersave cpufreq_userspace freq_table cpufreq_conservative binfmt_misc kvm_amd kvm ipv6 vfat fat dm_crypt dm_mod 8250_pnp 8250 serial_core edac_core pcspkr k10temp ohci_hcd
[  495.424693] Pid: 1923, comm: udevd Tainted: G        W  2.6.34-rc3-00506-g6c62fe4 #1
[  495.424723] Call Trace:
[  495.424758]  [<ffffffff81038fe0>] warn_slowpath_common+0x7c/0x94
[  495.424788]  [<ffffffff8103904f>] warn_slowpath_fmt+0x41/0x43
[  495.424816]  [<ffffffff810bcd20>] unmap_vmas+0x548/0xa29
[  495.424843]  [<ffffffff810bd021>] ? unmap_vmas+0x849/0xa29
[  495.424875]  [<ffffffff810c17d8>] exit_mmap+0x102/0x1e4
[  495.424901]  [<ffffffff810c173f>] ? exit_mmap+0x69/0x1e4
[  495.424926]  [<ffffffff810368bc>] mmput+0x48/0xb9
[  495.424954]  [<ffffffff8103ad90>] exit_mm+0x110/0x11d
[  495.424981]  [<ffffffff8103c9e6>] do_exit+0x1c5/0x6e5
[  495.425008]  [<ffffffff81065387>] ? trace_hardirqs_off_caller+0x1f/0xa9
[  495.425038]  [<ffffffff8141016d>] ? retint_swapgs+0xe/0x13
[  495.425065]  [<ffffffff8103cf8a>] do_group_exit+0x84/0xb0
[  495.425091]  [<ffffffff8103cfcd>] sys_exit_group+0x17/0x1b
[  495.425119]  [<ffffffff8100221b>] system_call_fastpath+0x16/0x1b
[  495.425156] ---[ end trace d9664ac54d1edb11 ]---


-- 
Regards/Gruss,
    Boris.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Linux 2.6.34-rc3, Linus Torvalds, (Tue Mar 30, 10:50 am)
[Regression, post-rc2] Commit a5ee4eb7541 breaks OpenGL on ..., Rafael J. Wysocki, (Tue Mar 30, 2:16 pm)
Re: [Regression, post-rc2] Commit a5ee4eb7541 breaks OpenG ..., Rafael J. Wysocki, (Wed Mar 31, 6:13 pm)
Re: [Regression, post-rc2] Commit a5ee4eb7541 breaks OpenG ..., Rafael J. Wysocki, (Thu Apr 1, 12:46 pm)
Re: [Regression, post-rc2] Commit a5ee4eb7541 breaks OpenG ..., Rafael J. Wysocki, (Sat Apr 3, 12:33 pm)
[PATCH] rmap: fix anon_vma_fork() memory leak, Rik van Riel, (Sun Apr 4, 4:09 pm)
Re: [PATCH] rmap: fix anon_vma_fork() memory leak, Minchan Kim, (Sun Apr 4, 4:56 pm)
Re: [PATCH] rmap: fix anon_vma_fork() memory leak, Linus Torvalds, (Mon Apr 5, 8:37 am)
Re: [PATCH] rmap: fix anon_vma_fork() memory leak, Minchan Kim, (Mon Apr 5, 8:48 am)
Re: [PATCH] rmap: fix anon_vma_fork() memory leak, Rik van Riel, (Mon Apr 5, 9:04 am)
[PATCH -v2] rmap: fix anon_vma_fork() memory leak, Rik van Riel, (Mon Apr 5, 9:13 am)
[No subject], Rik van Riel, (Tue Apr 6, 7:34 am)
[No subject], Rik van Riel, (Tue Apr 6, 7:38 am)
[No subject], Minchan Kim, (Tue Apr 6, 8:34 am)
[No subject], Rik van Riel, (Tue Apr 6, 8:40 am)
[No subject], Linus Torvalds, (Tue Apr 6, 8:55 am)
[No subject], Minchan Kim, (Tue Apr 6, 8:58 am)
[No subject], Minchan Kim, (Tue Apr 6, 9:23 am)
[No subject], Linus Torvalds, (Tue Apr 6, 9:28 am)
[No subject], Linus Torvalds, (Tue Apr 6, 9:32 am)
[No subject], Minchan Kim, (Tue Apr 6, 9:45 am)
[No subject], Linus Torvalds, (Tue Apr 6, 9:53 am)
[No subject], Minchan Kim, (Tue Apr 6, 9:54 am)
[No subject], Rik van Riel, (Tue Apr 6, 10:04 am)
[No subject], Borislav Petkov, (Tue Apr 6, 10:05 am)
Re: Ugly rmap NULL ptr deref oopsie on hibernate (was Linu ..., Steinar H. Gunderson, (Tue Apr 6, 12:10 pm)
Re: Ugly rmap NULL ptr deref oopsie on hibernate (was Linu ..., Steinar H. Gunderson, (Tue Apr 6, 1:46 pm)
Re: Ugly rmap NULL ptr deref oopsie on hibernate (was Linu ..., Steinar H. Gunderson, (Tue Apr 6, 2:05 pm)
[PATCH 1/3] mm: make page freeing path RCU-safe, Borislav Petkov, (Sun Apr 11, 6:19 am)
[PATCH 2/3] mm: cleanup find_mergeable_anon_vma complexity, Borislav Petkov, (Sun Apr 11, 6:19 am)
[PATCH 3/3] mm: fixup vma_adjust, Borislav Petkov, (Sun Apr 11, 6:19 am)
[PATCH 2/3] mm: cleanup find_mergeable_anon_vma complexity, Borislav Petkov, (Sun Apr 11, 6:25 am)
Re: [PATCH -v2] rmap: make anon_vma_prepare link in all th ..., Borislav Petkov, (Mon Apr 12, 12:20 am)
[PATCH 2/4] vma_adjust: fix the copying of anon_vma chains, Linus Torvalds, (Mon Apr 12, 1:23 pm)