Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1854ebc authored by Ralf Baechle's avatar Ralf Baechle Committed by David S. Miller
Browse files

[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: default avatarRalf Baechle <ralf@linux-mips.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 09a62660
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -515,6 +515,7 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
			count = kiss_esc(p, (unsigned char *)ax->xbuff, len);
		}
  	}
	spin_unlock_bh(&ax->buflock);

	set_bit(TTY_DO_WRITE_WAKEUP, &ax->tty->flags);
	actual = ax->tty->driver->write(ax->tty, ax->xbuff, count);
@@ -524,7 +525,6 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
	ax->dev->trans_start = jiffies;
	ax->xleft = count - actual;
	ax->xhead = ax->xbuff + actual;
	spin_unlock_bh(&ax->buflock);
}

/* Encapsulate an AX.25 packet and kick it into a TTY queue. */