Skip to contentSkip to conversation

con2fbmap limit check

PATCH In review Peter Samuelson 2 participants 3 messages Oct 31, 2007 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 con2fbmap limit check

Trivial patch to avoid an oops I hit when trying to figure out how to use con2fbmap.

Signature · 8 lines
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/
#1 lore raw
Quoted 2 lines · Peter Samuelson

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 -- [email protected]

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/

#2 lore raw

[Geert Uytterhoeven]

Quoted 1 line

No patch included?

Ha. Guess I was hasty. Sorry about that.

Signature · 9 lines
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/

commit fe3c8a57a2f8c0b169898c5a0b5f3dcc6de5943e
Author: Peter Samuelson <[email protected]>
Date:   Wed Oct 31 09:49:28 2007 -0500

    Fix limit check in FBIOPUT_CON2FBMAP ioctl.
    
    Signed-Off-By: Peter Samuelson <[email protected]>
drivers/video/fbmem.c +1 -1
index 1194f5e..df679ef 100644
@@ -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/