linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] con2fbmap limit check
@ 2007-10-31 14:58 Peter Samuelson
  2007-10-31 19:48 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Samuelson @ 2007-10-31 14:58 UTC (permalink / raw)
  To: linux-fbdev-devel


Trivial patch to avoid an oops I hit when trying to figure out how to
use con2fbmap.
-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] con2fbmap limit check
  2007-10-31 14:58 [patch] con2fbmap limit check Peter Samuelson
@ 2007-10-31 19:48 ` Geert Uytterhoeven
  2007-10-31 20:50   ` Peter Samuelson
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2007-10-31 19:48 UTC (permalink / raw)
  To: Peter Samuelson; +Cc: linux-fbdev-devel

On Wed, 31 Oct 2007, Peter Samuelson wrote:
> Trivial patch to avoid an oops I hit when trying to figure out how to
> use con2fbmap.

No patch included?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] con2fbmap limit check
  2007-10-31 19:48 ` Geert Uytterhoeven
@ 2007-10-31 20:50   ` Peter Samuelson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Samuelson @ 2007-10-31 20:50 UTC (permalink / raw)
  To: linux-fbdev-devel


[Geert Uytterhoeven]
> No patch included?

Ha.  Guess I was hasty.  Sorry about that.
-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/

commit fe3c8a57a2f8c0b169898c5a0b5f3dcc6de5943e
Author: Peter Samuelson <peter@p12n.org>
Date:   Wed Oct 31 09:49:28 2007 -0500

    Fix limit check in FBIOPUT_CON2FBMAP ioctl.
    
    Signed-Off-By: Peter Samuelson <peter@p12n.org>

diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 1194f5e..df679ef 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1057,7 +1057,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 	case FBIOPUT_CON2FBMAP:
 		if (copy_from_user(&con2fb, argp, sizeof(con2fb)))
 			return - EFAULT;
-		if (con2fb.console < 0 || con2fb.console > MAX_NR_CONSOLES)
+		if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
 		    return -EINVAL;
 		if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX)
 		    return -EINVAL;

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-31 20:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31 14:58 [patch] con2fbmap limit check Peter Samuelson
2007-10-31 19:48 ` Geert Uytterhoeven
2007-10-31 20:50   ` Peter Samuelson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).