]> git.baikalelectronics.ru Git - kernel.git/commit
can: Do not call dev_put if restart timer is running upon close
authorAlexander Stein <alexander.stein@systec-electronic.com>
Tue, 27 Nov 2012 07:52:34 +0000 (08:52 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 29 Nov 2012 13:30:08 +0000 (14:30 +0100)
commit5c68d353827a21f5982939c3ae59ff8d7b060813
treeee5ccc5e13c9faf3a8b45a4ed084b22774328f9f
parentb94a78f696fa3d7f3453fb27dea41967054db160
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>
drivers/net/can/dev.c