lkml.org 
[lkml]   [2009]   [Dec]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[Patch] console: limit the range of VGACON_SOFT_SCROLLBACK_SIZE

BuraphaLinux reported that we will trigger a mm warning when
we CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=65536, this is because
mm cann't allocate so many pages. We should limit the range
of CONFIG_VGACON_SOFT_SCROLLBACK_SIZE, don't give a user
any chance to trigger that.

Reported-by: BuraphaLinux Server <buraphalinuxserver@gmail.com>
Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: David S. Miller <davem@davemloft.net>

---
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index fc7d9bb..8e8f18d 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -37,6 +37,7 @@ config VGACON_SOFT_SCROLLBACK
config VGACON_SOFT_SCROLLBACK_SIZE
int "Scrollback Buffer Size (in KB)"
depends on VGACON_SOFT_SCROLLBACK
+ range 1 1024
default "64"
help
Enter the amount of System RAM to allocate for the scrollback

\
 
 \ /
  Last update: 2009-12-25 03:43    [W:0.032 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site