Skip to content

Commit

Permalink
netxen: protect resource cleanup by rtnl lock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Amit Kumar Salecha authored and David S. Miller committed Feb 4, 2010
1 parent 41f3e0b commit e15eec2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e15eec2

Please sign in to comment.