netxen: protect resource cleanup by rtnl lock
authorAmit Kumar Salecha <amit.salecha@qlogic.com>
Tue, 2 Feb 2010 04:16:21 +0000 (04:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Feb 2010 03:15:24 +0000 (19:15 -0800)
o context resources can be in used, while resource cleanup is in progress,
  during fw recover.
o Null pointer execption can occur in send_cmd_desc, if fw recovery
  module frees tx ring without rtnl lock.
o Same applies to ethtool register dump.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netxen/netxen_nic_main.c

index 5209095..24279e6 100644 (file)
@@ -2240,7 +2240,9 @@ netxen_detach_work(struct work_struct *work)
 
        netxen_nic_down(adapter, netdev);
 
+       rtnl_lock();
        netxen_nic_detach(adapter);
+       rtnl_unlock();
 
        status = NXRD32(adapter, NETXEN_PEG_HALT_STATUS1);