]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2013 18:56:16 +0000 (10:56 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2013 18:56:16 +0000 (10:56 -0800)
added patches:
can-do-not-call-dev_put-if-restart-timer-is-running-upon-close.patch

queue-3.4/can-do-not-call-dev_put-if-restart-timer-is-running-upon-close.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/can-do-not-call-dev_put-if-restart-timer-is-running-upon-close.patch b/queue-3.4/can-do-not-call-dev_put-if-restart-timer-is-running-upon-close.patch
new file mode 100644 (file)
index 0000000..e20b80f
--- /dev/null
@@ -0,0 +1,38 @@
+From ab48b03ec9ae1840a1e427e2375bd0d9d554b4ed Mon Sep 17 00:00:00 2001
+From: Alexander Stein <alexander.stein@systec-electronic.com>
+Date: Tue, 27 Nov 2012 08:52:34 +0100
+Subject: can: Do not call dev_put if restart timer is running upon close
+
+From: Alexander Stein <alexander.stein@systec-electronic.com>
+
+commit ab48b03ec9ae1840a1e427e2375bd0d9d554b4ed upstream.
+
+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
+
+Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/can/dev.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/net/can/dev.c
++++ b/drivers/net/can/dev.c
+@@ -576,8 +576,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);
index e670d693e4494f732de4b4e5e5b0d6dd89be8fad..3d2a620302d8a34cfcf8337e4055737012afd628 100644 (file)
@@ -77,3 +77,4 @@ drivers-rtc-rtc-vt8500.c-correct-handling-of-cr_24h-bitfield.patch
 drivers-rtc-rtc-vt8500.c-fix-handling-of-data-passed-in-struct-rtc_time.patch
 mm-limit-mmu_gather-batching-to-fix-soft-lockups-on-config_preempt.patch
 hid-add-apple-wireless-keyboard-2011-ansi-to-special-driver-list.patch
+can-do-not-call-dev_put-if-restart-timer-is-running-upon-close.patch