lkml.org 
[lkml]   [2010]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/7] 68328serial: check return value of copy_*_user() instead of access_ok()
On Sat, Jul 31, 2010 at 09:38:00PM +0400, Kulikov Vasiliy wrote:
> - sizeof(struct m68k_serial)))
> - return -EFAULT;
> - copy_to_user((struct m68k_serial *) arg,
> + return copy_to_user((struct m68k_serial *) arg,
> info, sizeof(struct m68k_serial));

We should return if -EFAULT copy_to_user() failes here.

> - return 0;
> -
> default:
> return -ENOIOCTLCMD;
> }

Smatch would have caught that but I don't have a cross compile
environment set up.

regards,
dan carpenter


\
 
 \ /
  Last update: 2010-07-31 21:11    [W:0.100 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site