* [PATCH 2/2] raw: set range for MAX_RAW_DEVS
@ 2014-02-04 22:23 Paul Bolle
0 siblings, 0 replies; only message in thread
From: Paul Bolle @ 2014-02-04 22:23 UTC (permalink / raw)
To: Arnd Bergmann, Greg Kroah-Hartman; +Cc: linux-kernel
The Kconfig symbol MAX_RAW_DEVS is meant to be between 1 and 65536. But
those boundaries are not enforced by its Kconfig entry.
Note that MAX_RAW_DEVS is used to set MAX_RAW_MINORS in
drivers/char/raw.c. If one would accidentally set MAX_RAW_DEVS to an
invalid value, that invalid value will actually end up being used in
raw_init().
So add an appropriate range to this Kconfig entry.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
drivers/char/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index fa3243d..1386749 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -499,6 +499,7 @@ config RAW_DRIVER
config MAX_RAW_DEVS
int "Maximum number of RAW devices to support (1-65536)"
depends on RAW_DRIVER
+ range 1 65536
default "256"
help
The maximum number of RAW devices that are supported.
--
1.8.5.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-02-04 22:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04 22:23 [PATCH 2/2] raw: set range for MAX_RAW_DEVS Paul Bolle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox