Char: moxa, fix locking in moxa_write
commit0ad7c9af3e1cbb97082062266705d6cb5fb207ee
authorJiri Slaby <jslaby@suse.cz>
Wed, 20 Apr 2011 08:43:15 +0000 (20 10:43 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 25 Apr 2011 21:19:11 +0000 (25 14:19 -0700)
tree7934df8bfa67d18d21e9d9ee7f9efc6a431854a6
parent7fdc28931176a17ef0bdc5d35742925a155533c4
Char: moxa, fix locking in moxa_write

moxa_write can be called from atomic context with irqs disabled (from
ppp_async_push). Don't enable interrupts by spin_unlock_bh as this
might cause deadlocks in the ppp layer.

Instead, use irqsave/irqrestore spin_lock functions.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/moxa.c