Commit c1854ebc7f13b23c3d6a6e641a1a1db1116ca998

Authored by Ralf Baechle
Committed by David S. Miller
1 parent 09a626600b

[AX25] mkiss: Drop spinlock before sleeping call.

With the previous missing-unlock fix the spinlock is dropped only
after the tty->driver->write() call which might sleep.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/net/hamradio/mkiss.c
... ... @@ -515,6 +515,7 @@
515 515 count = kiss_esc(p, (unsigned char *)ax->xbuff, len);
516 516 }
517 517 }
  518 + spin_unlock_bh(&ax->buflock);
518 519  
519 520 set_bit(TTY_DO_WRITE_WAKEUP, &ax->tty->flags);
520 521 actual = ax->tty->driver->write(ax->tty, ax->xbuff, count);
... ... @@ -524,7 +525,6 @@
524 525 ax->dev->trans_start = jiffies;
525 526 ax->xleft = count - actual;
526 527 ax->xhead = ax->xbuff + actual;
527   - spin_unlock_bh(&ax->buflock);
528 528 }
529 529  
530 530 /* Encapsulate an AX.25 packet and kick it into a TTY queue. */