BUG: sleeping function called from invalid context at arch/arm/mm/fault.c:301

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Sep 18 05:41:17 EDT 2013


On Wed, Sep 18, 2013 at 10:54:19AM +0200, Krzysztof Hałasa wrote:
> ipx435, v3.11, the card hw has gone wild (another issue) and generates
> data abort on register access in ISR. The issue here is the warning in
> do_page_fault(), is it normal?

It is normal if the data abort gets caused from a non-atomic context.
The real question is what is solo_isr() doing causing a data abort
in the first place.

I suspect it's this great bit of coding in free_solo_dev():

                pci_iounmap(pdev, solo_dev->reg_base);
                if (pdev->irq)
                        free_irq(pdev->irq, solo_dev);

So, what happens if you receive an IRQ (possibly shared by other PCI
devices) but you've unmapped the registers?

        status = solo_reg_read(solo_dev, SOLO_IRQ_STAT);
        if (!status)
                return IRQ_NONE;

where solo_reg_read() does this:
        ret = readl(solo_dev->reg_base + reg);

Yep, we try to read from memory we've just unmapped.

It's a driver bug.  Please report this to the driver authors.



More information about the linux-arm-kernel mailing list