serial: SERIAL_8250_RUNTIME_UARTS must be <= SERIAL_8250_NR_UARTS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If SERIAL_8250_RUNTIME_UARTS is > SERIAL_8250_NR_UARTS then more serial
ports are registered than we've allocated memory for.  Prevent this by
limiting SERIAL_8250_RUNTIME_UARTS in the serial Kconfig.

Signed-off-by: David Vrabel <[email protected]>
-- 
David Vrabel, Design Engineer

Arcom, Clifton Road           Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK         Web: http://www.arcom.com/
Index: linux-2.6-working/drivers/serial/Kconfig
===================================================================
--- linux-2.6-working.orig/drivers/serial/Kconfig	2006-02-03 14:22:05.000000000 +0000
+++ linux-2.6-working/drivers/serial/Kconfig	2006-02-06 10:17:52.000000000 +0000
@@ -98,6 +98,7 @@
 config SERIAL_8250_RUNTIME_UARTS
 	int "Number of 8250/16550 serial ports to register at runtime"
 	depends on SERIAL_8250
+	range 0 SERIAL_8250_NR_UARTS
 	default "4"
 	help
 	  Set this to the maximum number of serial ports you want
@@ -105,6 +106,9 @@
 	  with the module parameter "nr_uarts", or boot-time parameter
 	  8250.nr_uarts
 
+	  This must be less than or equal to the maximum number of 8250/16550
+	  serial ports supported (SERIAL_8250_NR_UARTS).
+
 config SERIAL_8250_EXTENDED
 	bool "Extended 8250/16550 serial driver options"
 	depends on SERIAL_8250

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux