From: Jon Smirl <hidden> Date: 2003-01-05 20:18:39
I'm using 2.53 and I ran into this when running
fbtest. It looks like a return went missing.
case FBIOGETCMAP:
if (copy_from_user(&cmap, (void *) arg,
sizeof(cmap)))
return -EFAULT;
fb_copy_cmap(&info->cmap, &cmap, 0);
case FBIOPAN_DISPLAY:
In 2.4 it looked like this:
case FBIOGETCMAP:
if (copy_from_user(&cmap, (void *) arg,
sizeof(cmap)))
return -EFAULT;
return (fb->fb_get_cmap(&cmap, 0,
PROC_CONSOLE(info), info));
case FBIOPAN_DISPLAY:
=====
Jon Smirl
jonsmirl@yahoo.com
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
From: James Simmons <hidden> Date: 2003-01-05 20:36:37
I'm using 2.53 and I ran into this when running
fbtest. It looks like a return went missing.
case FBIOGETCMAP:
if (copy_from_user(&cmap, (void *) arg,
sizeof(cmap)))
return -EFAULT;
fb_copy_cmap(&info->cmap, &cmap, 0);
case FBIOPAN_DISPLAY:
In 2.4 it looked like this:
case FBIOGETCMAP:
if (copy_from_user(&cmap, (void *) arg,
sizeof(cmap)))
return -EFAULT;
return (fb->fb_get_cmap(&cmap, 0,
PROC_CONSOLE(info), info));
case FBIOPAN_DISPLAY:
In the latest code there is a return 0 after fb_copy_cmap. So it is fixed
with the latest tree.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
From: Jon Smirl <hidden> Date: 2003-01-05 20:40:35
It needs a copy_to_user too to work. Probably doesn't
need the copy_from_user.
Is the right fix?
case FBIOGETCMAP:
fb_copy_cmap(&info->cmap, &cmap, 0);
if (copy_to_user((void *) arg, &cmap, sizeof(cmap)))
return -EFAULT;
return 0;
=====
Jon Smirl
jonsmirl@yahoo.com
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
From: James Simmons <hidden> Date: 2003-01-05 20:53:12
It needs a copy_to_user too to work. Probably doesn't
need the copy_from_user.
Is the right fix?
case FBIOGETCMAP:
fb_copy_cmap(&info->cmap, &cmap, 0);
if (copy_to_user((void *) arg, &cmap, sizeof(cmap)))
return -EFAULT;
return 0;
Oops. I see the problem. It should be
fb_copy_cmap(&info->cmap, &cmap, 2);
This tells it to use copy_to_user. I see a few mistakes here. Fixing...
There are several bugs here. I have to cleanup it up. FOr example in
fb_copy_cmap there is test for a EFAULT for any copy_* function. This is
just broken. It has been broken for a long time. Will fix. Will you test
my patch as soon as it is ready?
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf