diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2010-01-15 17:01:32 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-16 12:15:39 -0800 |
commit | 8ff410daa009c4b44be445ded5b0cec00abc0426 (patch) | |
tree | c8cd0a20b7116e7f150397d50b25fc626bec86dd /ipc/shm.c | |
parent | ba168fc37dea145deeb8fa9e7e71c748d2e00d74 (diff) | |
download | op-kernel-dev-8ff410daa009c4b44be445ded5b0cec00abc0426.zip op-kernel-dev-8ff410daa009c4b44be445ded5b0cec00abc0426.tar.gz |
sysdev: fix prototype for memory_sysdev_class show/store functions
The function prototype mismatches in call stack:
[<ffffffff81494268>] print_block_size+0x58/0x60
[<ffffffff81487e3f>] sysdev_class_show+0x1f/0x30
[<ffffffff811d629b>] sysfs_read_file+0xcb/0x1f0
[<ffffffff81176328>] vfs_read+0xc8/0x180
Due to prototype mismatch, print_block_size() will sprintf() into
*attribute instead of *buf, hence user space will read the initial
zeros from *buf:
$ hexdump /sys/devices/system/memory/block_size_bytes
0000000 0000 0000 0000 0000
0000008
After patch:
cat /sys/devices/system/memory/block_size_bytes
0x8000000
This complements commits c29af9636 and 4a0b2b4dbe.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: "Zheng, Shaohui" <shaohui.zheng@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/shm.c')
0 files changed, 0 insertions, 0 deletions