On 03/26/2012 09:30 PM, Ben Hutchings wrote:

> 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.
> 

You mean to say that this issue needs to be revisited in mainline too?

> 
>> +            /*
>> +             * 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;
>>      }
> 
> 

 
Regards,
Srivatsa S. Bhat

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to