Re: 2.5.47 -- OOPS -- sleeping function called from illegal context atmm/page_alloc.c:417

From: Andrew Morton (akpm@digeo.com)
Date: Tue Nov 12 2002 - 03:58:51 EST


(It is not an oops. It is a debug trace)

Miles Lane wrote:
>
> ohci1394: $Rev: 601 $ Ben Collins <bcollins@debian.org>
> ohci1394_0: Unexpected PCI resource length of 1000!
> ohci1394_0: OHCI-1394 1.0 (PCI): IRQ=[9] MMIO=[febfc000-febfc7ff] Max
> Packet=[2048]
> Debug: sleeping function called from illegal context at mm/page_alloc.c:417
> Call Trace:

void highlevel_add_host(struct hpsb_host *host)
{
        struct list_head *entry;
        struct hpsb_highlevel *hl;

        read_lock(&hl_drivers_lock);
        list_for_each(entry, &hl_drivers) {
                hl = list_entry(entry, struct hpsb_highlevel, hl_list);

                hl->op->add_host(host);
        }
        read_unlock(&hl_drivers_lock);
}

That's a pretty bad bug. You shouldn't sleep inside read_lock(), and this
function is performing GFP_KERNEL allocations and even launching kernel
threads inside that lock.

Can hl_drivers_lock become a semaphore?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 15 2002 - 22:00:25 EST