Hello Carolyn Wyborny,

The patch 441fc6fdb47a: "igb: Add i2c interface to igb." from Dec 7, 
2012, leads to the following warning:
drivers/net/ethernet/intel/igb/igb_main.c:7641 igb_get_i2c_client()
         error: scheduling with locks held: 'spin_lock:i2c_clients_lock'

  7622          spin_lock_irqsave(&i2c_clients_lock, flags);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We take the spin_lock here.

  7623          client_list = adapter->i2c_clients;
  7624  
  7625          /* See if we already have an i2c_client */
  7626          while (client_list) {
  7627                  if (client_list->client->addr == (dev_addr >> 1)) {
  7628                          client = client_list->client;
  7629                          goto exit;
  7630                  } else {
  7631                          client_list = client_list->next;
  7632                  }
  7633          }
  7634  
  7635          /* no client_list found, create a new one as long as
  7636           * irqs are not disabled
  7637           */
  7638          if (unlikely(irqs_disabled()))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
IRQs are always disabled here, so we never get to the kzalloc()
actually.

  7639                  goto exit;
  7640  
  7641          client_list = kzalloc(sizeof(*client_list), GFP_KERNEL);
                                                            ^^^^^^^^^^
We can sleep here.

  7642          if (client_list == NULL)
  7643                  goto exit;


regards,
dan carpenter


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to