diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-03-09 11:50:42 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-03-09 11:50:42 +0100 |
commit | ab92f30875a7ec3e84644a5494febd8901e66742 (patch) | |
tree | 5254eb36b20b0d1c584c15d0bf3d6a5a9c1bb451 /drivers/tty/tty_mutex.c | |
parent | bb9eadf0c35f2e7eb5ca6468f46ebb7473b85537 (diff) | |
parent | b40c4892d175874d118860c8282a85ee7b64bcbb (diff) | |
download | op-kernel-dev-ab92f30875a7ec3e84644a5494febd8901e66742.zip op-kernel-dev-ab92f30875a7ec3e84644a5494febd8901e66742.tar.gz |
Merge tag 'kvm-arm-for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/ARM updates for 4.6
- VHE support so that we can run the kernel at EL2 on ARMv8.1 systems
- PMU support for guests
- 32bit world switch rewritten in C
- Various optimizations to the vgic save/restore code
Conflicts:
include/uapi/linux/kvm.h
Diffstat (limited to 'drivers/tty/tty_mutex.c')
-rw-r--r-- | drivers/tty/tty_mutex.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/tty/tty_mutex.c b/drivers/tty/tty_mutex.c index d2f3c4c..dfa9ec0 100644 --- a/drivers/tty/tty_mutex.c +++ b/drivers/tty/tty_mutex.c @@ -21,10 +21,15 @@ EXPORT_SYMBOL(tty_lock); int tty_lock_interruptible(struct tty_struct *tty) { + int ret; + if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty)) return -EIO; tty_kref_get(tty); - return mutex_lock_interruptible(&tty->legacy_mutex); + ret = mutex_lock_interruptible(&tty->legacy_mutex); + if (ret) + tty_kref_put(tty); + return ret; } void __lockfunc tty_unlock(struct tty_struct *tty) |