Re: 4.9-rc7: (forcedeth?) BUG: sleeping function called from invalid context at kernel/irq/manage.c:110

From: Linus Torvalds
Date: Tue Nov 29 2016 - 14:11:20 EST


On Tue, Nov 29, 2016 at 12:26 PM, Meelis Roos <mroos@xxxxxxxx> wrote:
> This is 4.9-rc7 on Sun Ultra 20 (Opteron 175 on NVidia chipset PC with
> NVidia ethernet).
>
> BUG: sleeping function called from invalid context at kernel/irq/manage.c:110

Hmm. No changes in either forcedeth or in the synchronize_irq() debugging.

It seems to be due to netconsole. Did you enable new debugging (like
the DEBUG_ATOMIC_SLEEP config option) or change any netconsole things?

It looks like it's simply the dev_info() call in usb_add_hcd():

dev_info(hcd->self.controller, "%s\n", hcd->product_desc);

and the printk() in amd64_edac_init():

printk(KERN_INFO "AMD64 EDAC driver v%s\n", EDAC_AMD64_VERSION);

and yes, netconsole does "write_msg()" which is run with interrupts
disabled and the 'target_list_lock' spinlock held.

So when netpoll_send_udp() then calls down to the NIC poll routine, we
definitely are in an atomic context.

But none of this looks new. I don't see _anything_ in any of these
areas that has changed since 4.8.

Which is why I suspect you changed something in your setup wrt
netconsole or your kernel config?

Linus