diff options
author | Amit Kumar Salecha <amit.salecha@qlogic.com> | 2010-02-01 05:24:57 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-02 15:55:45 -0800 |
commit | ce6684433fb277406dd861fd8a17133253e7c367 (patch) | |
tree | d3734121875c91d01d37e448da2d1c34ba7c274a /drivers/net/qlcnic/qlcnic_main.c | |
parent | 1b95a839587f40abab2f9cb3e5254dc821b9829b (diff) |
qlcnic: protect resoruce cleanup by rtnl lock
o context resources can be in used, while resoruce 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 and FW health registers should be dump
in any case.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_main.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 9a98285ee79..7259adc3263 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c @@ -2051,7 +2051,9 @@ qlcnic_detach_work(struct work_struct *work) qlcnic_down(adapter, netdev); + rtnl_lock(); qlcnic_detach(adapter); + rtnl_unlock(); status = QLCRD32(adapter, QLCNIC_PEG_HALT_STATUS1); |