From e9bcb173dd1747075214a1ccdb65dc6320cae49d Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:01 +0100 Subject: [PATCH] Kconfig fix (epca on 64bit) epca is broken on 64bit; marked as such Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/char/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/char') diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 4f27e551929..4279304f43c 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -138,7 +138,7 @@ config CYZ_INTR config DIGIEPCA tristate "Digiboard Intelligent Async Support" - depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP && (!64BIT || BROKEN) ---help--- This is a driver for Digi International's Xx, Xeve, and Xem series of cards which provide multiple serial ports. You would need -- cgit v1.2.3-70-g09d2 From 253a9c3308dd931e35f8527d9bda7dba591601d3 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:16 +0100 Subject: [PATCH] Kconfig fix (m32r genrtc) genrtc is not for m32r; marked as such. Probably ought to put that into arch/* - list of "don't build it on " is getting too long. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/char/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/char') diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 4279304f43c..bb1c94c954e 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -735,7 +735,7 @@ config SGI_IP27_RTC config GEN_RTC tristate "Generic /dev/rtc emulation" - depends on RTC!=y && !IA64 && !ARM && !PPC64 + depends on RTC!=y && !IA64 && !ARM && !PPC64 && !M32R ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you -- cgit v1.2.3-70-g09d2 From a238b563502a7f458624b9c6404742e441b2f9e8 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:46:51 +0100 Subject: [PATCH] Kconfig fix (sparc32 drivers/char dependencies) since sparc32 Kconfig includes drivers/char/Kconfig (instead of duplicating its parts) we need several new dependencies there to exclude the stuff broken on sparc32 and not excluded by existing dependencies. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/char/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/char') diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index bb1c94c954e..7333b41d422 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -80,7 +80,7 @@ config SERIAL_NONSTANDARD config COMPUTONE tristate "Computone IntelliPort Plus serial support" - depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP && (BROKEN || !SPARC32) ---help--- This driver supports the entire family of Intelliport II/Plus controllers with the exception of the MicroChannel controllers and @@ -208,7 +208,7 @@ config SYNCLINK config SYNCLINKMP tristate "SyncLink Multiport support" - depends on SERIAL_NONSTANDARD + depends on SERIAL_NONSTANDARD && (BROKEN || !SPARC32) help Enable support for the SyncLink Multiport (2 or 4 ports) serial adapter, running asynchronous and HDLC communications up @@ -735,7 +735,7 @@ config SGI_IP27_RTC config GEN_RTC tristate "Generic /dev/rtc emulation" - depends on RTC!=y && !IA64 && !ARM && !PPC64 && !M32R + depends on RTC!=y && !IA64 && !ARM && !PPC64 && !M32R && !SPARC32 ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you -- cgit v1.2.3-70-g09d2 From f786648b89f00d4e66fe6b19beffd30e764651fc Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Sun, 28 Aug 2005 09:40:01 +1000 Subject: [PATCH] Remove race between con_open and con_close [ Same race and same patch also by Steven Rostedt ] I have a laptop (G3 powerbook) which will pretty reliably hit a race between con_open and con_close late in the boot process and oops in vt_ioctl due to tty->driver_data being NULL. What happens is this: process A opens /dev/tty6; it comes into con_open() (drivers/char/vt.c) and assign a non-NULL value to tty->driver_data. Then process A closes that and concurrently process B opens /dev/tty6. Process A gets through con_close() and clears tty->driver_data, since tty->count == 1. However, before process A can decrement tty->count, we switch to process B (e.g. at the down(&tty_sem) call at drivers/char/tty_io.c line 1626). So process B gets to run and comes into con_open with tty->count == 2, as tty->count is incremented (in init_dev) before con_open is called. Because tty->count != 1, we don't set tty->driver_data. Then when the process tries to do anything with that fd, it oopses. The simple and effective fix for this is to test tty->driver_data rather than tty->count in con_open. The testing and setting of tty->driver_data is serialized with respect to the clearing of tty->driver_data in con_close by the console_sem. We can't get a situation where con_open sees tty->driver_data != NULL and then con_close on a different fd clears tty->driver_data, because tty->count is incremented before con_open is called. Thus this patch eliminates the race, and in fact with this patch my laptop doesn't oops. Signed-off-by: Paul Mackerras [ Same patch Signed-off-by: Steven Rostedt in http://marc.theaimsgroup.com/?l=linux-kernel&m=112450820432121&w=2 ] Signed-off-by: Linus Torvalds --- drivers/char/vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/char') diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 30d96739fb2..665103ccaee 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -2433,7 +2433,7 @@ static int con_open(struct tty_struct *tty, struct file *filp) int ret = 0; acquire_console_sem(); - if (tty->count == 1) { + if (tty->driver_data == NULL) { ret = vc_allocate(currcons); if (ret == 0) { struct vc_data *vc = vc_cons[currcons].d; -- cgit v1.2.3-70-g09d2