Re: Debug: sleeping function called in atomic context

From: Arnd Bergmann
Date: Sat Dec 03 2005 - 07:52:49 EST


Am Freitag 02 Dezember 2005 21:32 schrieb Carlos MartÃn:
> ÂI've been having this problem since -rc2, but today the output stopped
> long enough for me to copy it.

It seems you copied enough of it.

> ÂThis happens on shutdown, I think the USB driver is deregistering itself
> or something or other.
>
> ÂThis is part of the output with -rc4
>
> in_atomic():1 irqs_disabled():0
> Debug: sleeping function called in atomic context at linux/rwsem.h:66
> change_page_attr_addr+46
> ioremap_change_attr+75
> iounmap+14
>
> :usbcore:usb_hcd_pci_remove+62

This is what happens:
ioumap calls ioremap_change_attr with vmlist_lock held. change_page_attr_addr
then tries to acquire init_mm.mmap_sem, which must not be taken with
spinlock held.

It looks like the incorrect code has been in there for quite some time, but
that path was not taken for some reason.

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