diff options
| author | Akinobu Mita <[email protected]> | 2011-07-19 15:49:25 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2011-07-20 05:09:30 +0000 |
| commit | f7b88631a89757d70192044c9d9f2e8d2fc02f2c (patch) | |
| tree | 51da597d7625d2428701be146f233cee047425d9 /lib/fault-inject.c | |
| parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vir... (diff) | |
| download | kernel-f7b88631a89757d70192044c9d9f2e8d2fc02f2c.tar.gz kernel-f7b88631a89757d70192044c9d9f2e8d2fc02f2c.zip | |
fs/libfs.c: fix simple_attr_write() on 32bit machines
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
A value larger 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 <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/fault-inject.c')
0 files changed, 0 insertions, 0 deletions
