From: Amit Kumar Salecha Date: Tue, 2 Feb 2010 04:16:21 +0000 (+0000) Subject: netxen: protect resource cleanup by rtnl lock X-Git-Tag: MMI-PSA29.97-13-9~24944^2~31 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e15eec2805565c7e31dbe402215637012f1e4616;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git netxen: protect resource cleanup by rtnl lock 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 5209095a8739..24279e6e55f5 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -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);