lkml.org 
[lkml]   [2012]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] watchdog: fix GETTIMEOUT ioctl in booke_wdt
Dmitry Artamonow wrote:
> +#ifdef CONFIG_FSL_BOOKE
> + return put_user(period_to_sec(booke_wdt_period), p);
> +#else

period_to_sec() returns an unsigned long long, which means that the driver
will write 8 bytes instead of 4 to user space. You need to use a
temporary u32, just like WDIOC_SETTIMEOUT:

if (get_user(tmp, p))
return -EFAULT;


--
Timur Tabi
Linux kernel developer at Freescale



\
 
 \ /
  Last update: 2012-01-27 22:11    [W:0.038 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site