lkml.org 
[lkml]   [2011]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] libfs: fix simple_attr_write on 32bit machine
On Sat, Jul 09, 2011 at 02:00:26PM +0900, Akinobu Mita wrote:
> Assume that /sys/kernel/debug/dummy64 is debugfs file created by
> debugfs_create_x64().
>
> # cd /sys/kernel/debug
> # echo 0x1234567812345678 > dummy64
> # cat dummy64
> 0x0000000012345678
>
> # echo 0x80000000 > dummy64
> # cat dummy64
> 0xffffffff80000000
>
> The value more than INT_MAX cannot be written to the debugfs file
> created by debugfs_create_u64 or debugfs_create_x64 on 32bit machine.
> Because simple_attr_write() uses simple_strtol() for the conversion.
>
> To fix this, use simple_strtoll() instead.
>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Greg Kroah-Hartman <gregkh@suse.de>

Do we have any debugfs files that need this change in the tree now for
3.1 or newer?

thanks,

greg k-h


\
 
 \ /
  Last update: 2011-08-23 02:47    [W:0.178 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site