On Mon, 2012-03-26 at 17:37 +0530, Srivatsa S. Bhat wrote: > From: Zheng Yan <[email protected]> > > [ Upstream commit 749ab2cd127046df79084b6b9165b23491b1db5f ] > > During suspend/resume (and possibly in other scenarios as well), the > ASSERT_RTNL() warning is triggered in netif_set_real_num_tx/rx_queues() > functions, something like: [...] > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c > b/drivers/net/ethernet/intel/igb/igb_main.c > index 222954d..8775087 100644 > --- a/drivers/net/ethernet/intel/igb/igb_main.c > +++ b/drivers/net/ethernet/intel/igb/igb_main.c > @@ -6697,7 +6697,18 @@ static int igb_resume(struct pci_dev *pdev) > pci_enable_wake(pdev, PCI_D3hot, 0); > pci_enable_wake(pdev, PCI_D3cold, 0); > > - if (igb_init_interrupt_scheme(adapter)) { > + if (!rtnl_is_locked()) {
This doesn't tell whether this process holds the lock. So it suppresses
the warning but doesn't fix the real bug.
Ben.
> + /*
> + * shut up ASSERT_RTNL() warning in
> + * netif_set_real_num_tx/rx_queues.
> + */
> + rtnl_lock();
> + err = igb_init_interrupt_scheme(adapter);
> + rtnl_unlock();
> + } else {
> + err = igb_init_interrupt_scheme(adapter);
> + }
> + if (err) {
> dev_err(&pdev->dev, "Unable to allocate memory for queues\n");
> return -ENOMEM;
> }
--
Ben Hutchings
Horngren's Observation:
Among economists, the real world is often a special case.
signature.asc
Description: This is a digitally signed message part
