projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'iwlwifi-for-kalle-2015-01-13' of https://git.kernel.org/pub/scm/linux...
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
tty
/
tty_ldisc.c
diff --git
a/drivers/tty/tty_ldisc.c
b/drivers/tty/tty_ldisc.c
index b66a81d0549e3171420ae948ec3a24ef74987836..3737f55272d2c1184463edc3714f89fb2724730e 100644
(file)
--- a/
drivers/tty/tty_ldisc.c
+++ b/
drivers/tty/tty_ldisc.c
@@
-572,8
+572,11
@@
int tty_set_ldisc(struct tty_struct *tty, int ldisc)
tty_ldisc_restore(tty, old_ldisc);
}
tty_ldisc_restore(tty, old_ldisc);
}
- if (tty->ldisc->ops->num != old_ldisc->ops->num && tty->ops->set_ldisc)
+ if (tty->ldisc->ops->num != old_ldisc->ops->num && tty->ops->set_ldisc) {
+ down_read(&tty->termios_rwsem);
tty->ops->set_ldisc(tty);
tty->ops->set_ldisc(tty);
+ up_read(&tty->termios_rwsem);
+ }
/* At this point we hold a reference to the new ldisc and a
reference to the old ldisc, or we hold two references to
/* At this point we hold a reference to the new ldisc and a
reference to the old ldisc, or we hold two references to