summaryrefslogtreecommitdiffstats
path: root/drivers/net/can
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@systec-electronic.com>2012-11-27 08:52:34 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2012-11-29 14:30:08 +0100
commitab48b03ec9ae1840a1e427e2375bd0d9d554b4ed (patch)
treeee5ccc5e13c9faf3a8b45a4ed084b22774328f9f /drivers/net/can
parent3177bf6f922f62743133abbcbbbb5545f4133b2d (diff)
downloadlinux-stable-ab48b03ec9ae1840a1e427e2375bd0d9d554b4ed.tar.gz
linux-stable-ab48b03ec9ae1840a1e427e2375bd0d9d554b4ed.tar.bz2
linux-stable-ab48b03ec9ae1840a1e427e2375bd0d9d554b4ed.zip
can: Do not call dev_put if restart timer is running upon close
If the restart timer is running due to BUS-OFF and the device is disconnected an dev_put will decrease the usage counter to -1 thus blocking the interface removal, resulting in the following dmesg lines repeating every 10s: can: notifier: receive list not found for dev can0 can: notifier: receive list not found for dev can0 can: notifier: receive list not found for dev can0 unregister_netdevice: waiting for can0 to become free. Usage count = -1 Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 963e2ccd10db..8233e5ed2939 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -609,8 +609,7 @@ void close_candev(struct net_device *dev)
{
struct can_priv *priv = netdev_priv(dev);
- if (del_timer_sync(&priv->restart_timer))
- dev_put(dev);
+ del_timer_sync(&priv->restart_timer);
can_flush_echo_skb(dev);
}
EXPORT_SYMBOL_GPL(close_candev);