diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 17:08:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 17:08:47 -0500 |
commit | c6bd5bcc4983f1a2d2f87a3769bf309482ee8c04 (patch) | |
tree | 2ff9c4496dc2258d601a1bcd82040470704dae3b /kernel | |
parent | 8966961b31c251b854169e9886394c2a20f2cea7 (diff) | |
parent | b0ab02361167faa82198b783a8d555eb6f58901c (diff) |
Merge tag 'tty-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull TTY/Serial merge from Greg Kroah-Hartman:
"Here's the big tty/serial tree set of changes for 3.8-rc1.
Contained in here is a bunch more reworks of the tty port layer from
Jiri and bugfixes from Alan, along with a number of other tty and
serial driver updates by the various driver authors.
Also, Jiri has been coerced^Wconvinced to be the co-maintainer of the
TTY layer, which is much appreciated by me.
All of these have been in the linux-next tree for a while.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
Fixed up some trivial conflicts in the staging tree, due to the fwserial
driver having come in both ways (but fixed up a bit in the serial tree),
and the ioctl handling in the dgrp driver having been done slightly
differently (staging tree got that one right, and removed both
TIOCGSOFTCAR and TIOCSSOFTCAR).
* tag 'tty-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (146 commits)
staging: sb105x: fix potential NULL pointer dereference in mp_chars_in_buffer()
staging/fwserial: Remove superfluous free
staging/fwserial: Use WARN_ONCE when port table is corrupted
staging/fwserial: Destruct embedded tty_port on teardown
staging/fwserial: Fix build breakage when !CONFIG_BUG
staging: fwserial: Add TTY-over-Firewire serial driver
drivers/tty/serial/serial_core.c: clean up HIGH_BITS_OFFSET usage
staging: dgrp: dgrp_tty.c: Audit the return values of get/put_user()
staging: dgrp: dgrp_tty.c: Remove the TIOCSSOFTCAR ioctl handler from dgrp driver
serial: ifx6x60: Add modem power off function in the platform reboot process
serial: mxs-auart: unmap the scatter list before we copy the data
serial: mxs-auart: disable the Receive Timeout Interrupt when DMA is enabled
serial: max310x: Setup missing "can_sleep" field for GPIO
tty/serial: fix ifx6x60.c declaration warning
serial: samsung: add devicetree properties for non-Exynos SoCs
serial: samsung: fix potential soft lockup during uart write
tty: vt: Remove redundant null check before kfree.
tty/8250 Add check for pci_ioremap_bar failure
tty/8250 Add support for Commtech's Fastcom Async-335 and Fastcom Async-PCIe cards
tty/8250 Add XR17D15x devices to the exar_handle_irq override
...
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/auditsc.c | 2 | ||||
-rw-r--r-- | kernel/printk.c | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 2f186ed80c4..fc7376bf86e 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1159,7 +1159,7 @@ void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk) | |||
1159 | cred = current_cred(); | 1159 | cred = current_cred(); |
1160 | 1160 | ||
1161 | spin_lock_irq(&tsk->sighand->siglock); | 1161 | spin_lock_irq(&tsk->sighand->siglock); |
1162 | if (tsk->signal && tsk->signal->tty && tsk->signal->tty->name) | 1162 | if (tsk->signal && tsk->signal->tty) |
1163 | tty = tsk->signal->tty->name; | 1163 | tty = tsk->signal->tty->name; |
1164 | else | 1164 | else |
1165 | tty = "(none)"; | 1165 | tty = "(none)"; |
diff --git a/kernel/printk.c b/kernel/printk.c index 2d607f4d179..22e070f3470 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -87,6 +87,12 @@ static DEFINE_SEMAPHORE(console_sem); | |||
87 | struct console *console_drivers; | 87 | struct console *console_drivers; |
88 | EXPORT_SYMBOL_GPL(console_drivers); | 88 | EXPORT_SYMBOL_GPL(console_drivers); |
89 | 89 | ||
90 | #ifdef CONFIG_LOCKDEP | ||
91 | static struct lockdep_map console_lock_dep_map = { | ||
92 | .name = "console_lock" | ||
93 | }; | ||
94 | #endif | ||
95 | |||
90 | /* | 96 | /* |
91 | * This is used for debugging the mess that is the VT code by | 97 | * This is used for debugging the mess that is the VT code by |
92 | * keeping track if we have the console semaphore held. It's | 98 | * keeping track if we have the console semaphore held. It's |
@@ -1908,12 +1914,14 @@ static int __cpuinit console_cpu_notify(struct notifier_block *self, | |||
1908 | */ | 1914 | */ |
1909 | void console_lock(void) | 1915 | void console_lock(void) |
1910 | { | 1916 | { |
1911 | BUG_ON(in_interrupt()); | 1917 | might_sleep(); |
1918 | |||
1912 | down(&console_sem); | 1919 | down(&console_sem); |
1913 | if (console_suspended) | 1920 | if (console_suspended) |
1914 | return; | 1921 | return; |
1915 | console_locked = 1; | 1922 | console_locked = 1; |
1916 | console_may_schedule = 1; | 1923 | console_may_schedule = 1; |
1924 | mutex_acquire(&console_lock_dep_map, 0, 0, _RET_IP_); | ||
1917 | } | 1925 | } |
1918 | EXPORT_SYMBOL(console_lock); | 1926 | EXPORT_SYMBOL(console_lock); |
1919 | 1927 | ||
@@ -1935,6 +1943,7 @@ int console_trylock(void) | |||
1935 | } | 1943 | } |
1936 | console_locked = 1; | 1944 | console_locked = 1; |
1937 | console_may_schedule = 0; | 1945 | console_may_schedule = 0; |
1946 | mutex_acquire(&console_lock_dep_map, 0, 1, _RET_IP_); | ||
1938 | return 1; | 1947 | return 1; |
1939 | } | 1948 | } |
1940 | EXPORT_SYMBOL(console_trylock); | 1949 | EXPORT_SYMBOL(console_trylock); |
@@ -2095,6 +2104,7 @@ skip: | |||
2095 | local_irq_restore(flags); | 2104 | local_irq_restore(flags); |
2096 | } | 2105 | } |
2097 | console_locked = 0; | 2106 | console_locked = 0; |
2107 | mutex_release(&console_lock_dep_map, 1, _RET_IP_); | ||
2098 | 2108 | ||
2099 | /* Release the exclusive_console once it is used */ | 2109 | /* Release the exclusive_console once it is used */ |
2100 | if (unlikely(exclusive_console)) | 2110 | if (unlikely(exclusive_console)) |