All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <dvrabel@arcom.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: serial: SERIAL_8250_RUNTIME_UARTS must be <= SERIAL_8250_NR_UARTS
Date: Mon, 06 Feb 2006 10:27:05 +0000	[thread overview]
Message-ID: <43E72479.4020804@arcom.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

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 <dvrabel@arcom.com>
-- 
David Vrabel, Design Engineer

Arcom, Clifton Road           Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK         Web: http://www.arcom.com/

[-- Attachment #2: serial-limit-SERIAL_8250_RUNTIME_UARTS --]
[-- Type: text/plain, Size: 872 bytes --]

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

             reply	other threads:[~2006-02-06 10:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-06 10:27 David Vrabel [this message]
2006-02-06 10:42 ` serial: SERIAL_8250_RUNTIME_UARTS must be <= SERIAL_8250_NR_UARTS Yuki Cuss
2006-02-06 19:41   ` Dave Jones
2006-02-06 10:59 ` David Vrabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43E72479.4020804@arcom.com \
    --to=dvrabel@arcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.