]> git.baikalelectronics.ru Git - kernel.git/commit
slip/slcan: added locking in wakeup function
authorAndre Naujoks <nautsch2@gmail.com>
Fri, 13 Sep 2013 17:37:11 +0000 (19:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Sep 2013 19:38:26 +0000 (15:38 -0400)
commit1e6651638b35fa10a91f1a45ebb9d9ff72baec1d
tree73ac9a9033f828b7130f4717005eb4404b8e67c5
parentb70f4c6d9ea013e13ea5cdb25ca0dd17f25bd231
slip/slcan: added locking in wakeup function

The locking is needed, since the the internal buffer for the CAN frames is
changed during the wakeup call. This could cause buffer inconsistencies
under high loads, especially for the outgoing short CAN packet skbuffs.

The needed locks led to deadlocks before commit
"524693f1511708c427f893bdf1008fb4e97cb6ec tty: Remove extra wakeup from pty
write() path", which removed the direct callback to the wakeup function from the
tty layer.

As slcan.c is based on slip.c the issue in the original code is fixed, too.

Signed-off-by: Andre Naujoks <nautsch2@gmail.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/can/slcan.c
drivers/net/slip/slip.c