staging: unisys: visornic - ensure proper net locking in tx reset logic
authorTim Sell <Timothy.Sell@unisys.com>
Fri, 24 Jul 2015 16:00:22 +0000 (12:00 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Jul 2015 20:43:37 +0000 (13:43 -0700)
commit4d79002e962466d455ae4933cd404cf5a1164894
tree690fc2d5bf0299cb2c100b116df464970577d531
parent7c03621a791499fdb47551693cd785f4fa5d03f8
staging: unisys: visornic - ensure proper net locking in tx reset logic

visornic tx reset handling is done asynchronously via a workqueue in
visornic_timeout_reset().  As a result, it needs to use rtnl_lock() /
rtnl_unlock() to lock against possible simultaneous close() of the network
device.

(I consulted the bnx2 driver as a model here, as that driver also does
its tx reset handling asynchronously, just like visornic does.  See
bnx2_tx_timeout() and bnx2_reset_task().)

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visornic/visornic_main.c