linux-stable-rt/drivers/base
Wu Fengguang 8ff410daa0 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>
2010-01-16 12:15:39 -08:00
..
power power: fix kernel-doc notation 2010-01-11 09:34:06 -08:00
Kconfig
Makefile
attribute_container.c
base.h
bus.c driver core: Prevent reference to freed memory on error path 2009-12-23 11:23:44 -08:00
class.c
core.c Driver-core: Fix bogus 0 error return in device_add() 2009-12-23 11:23:44 -08:00
cpu.c
dd.c
devres.c
devtmpfs.c devtmpfs: unlock mutex in case of string allocation error 2009-12-23 11:23:44 -08:00
dma-coherent.c
dma-mapping.c
driver.c Driver core: driver_attribute parameters can often be const* 2009-12-23 11:23:43 -08:00
firmware.c
firmware_class.c
hypervisor.c
init.c
iommu.c
isa.c
map.c
memory.c sysdev: fix prototype for memory_sysdev_class show/store functions 2010-01-16 12:15:39 -08:00
module.c
node.c
platform.c Driver core: export platform_device_register_data as a GPL symbol 2009-12-23 11:23:44 -08:00
sys.c
topology.c
transport_class.c