Re: Xen kernel 2.6.23-rc7 bug at xen_mc_flush (arch/i386/xen/multicalls.c:68)

From: Jeremy Fitzhardinge
Date: Mon Sep 24 2007 - 20:43:41 EST

osth@xxxxxxxxxxx wrote:
> Using kernel 2.6.23-rc7 as xen domU client system I observe a kernel bug
> which occurs reproducibly when calling a shell from midnight commander F2
> context menu or with testcase given below (However most other programs seem
> to
> be well behaved and do not trigger this bug). - A kernel compiled with debug
> info gives:

Hm, it just seems that its trying to unpin an mm on the error path of
execve, and so it hasn't been pinned. The simplest way to reproduce is:

$ echo foo > foo
$ chmod +x foo
$ ./foo

Anyway, try this patch.


arch/i386/xen/mmu.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

--- a/arch/i386/xen/mmu.c
+++ b/arch/i386/xen/mmu.c
@@ -558,6 +558,9 @@ void xen_exit_mmap(struct mm_struct *mm)

- xen_pgd_unpin(mm->pgd);
+ /* pgd may not be pinned in the error exit path of execve */
+ if (PagePinned(virt_to_page(mm->pgd)))
+ xen_pgd_unpin(mm->pgd);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at