Re: print_vma_addr possible deadlock (was Re: Jeste jeden bug)

From: Andi Kleen
Date: Wed Feb 13 2008 - 12:14:36 EST



> > in commit 03252919 you introduced print_vma_addr(), but this funcion for
> > obvious reasons takes mmap_sem, so it is not safe to call it from atomic
> > context (i.e. do_trap(), for example), which is behavior your patch
> > introduced.

Ah yes -- this behaviour of int3 do_trap was always a source of bugs. I remember
fixing such things in this area several times (last time in the RT kernel), but
I keep forgetting it. Sorry.

The correct fix is to run the int3 and debug handlers on the process stack
when the fault originated from user space. Then they can run preemptive
and it's ok to schedule for the lock too.

I'll fix that tomorrow.

-Andi
--
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/