]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Check sysfs size before copying
authorJoel Stanley <joel@jms.id.au>
Thu, 24 Apr 2014 07:25:35 +0000 (16:55 +0930)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 28 Apr 2014 03:08:48 +0000 (13:08 +1000)
commit21ad221aa3ad0f343c8a70c6153187cfbe8bcf93
treef4b8f3bec96478f6a5ce0dae9ea0b9ce8ce9b504
parent0fb4b66f8e309dfb27d6ffc6619e2ee9de26e853
powerpc/powernv: Check sysfs size before copying

The sysparam code currently uses the userspace supplied number of
bytes when memcpy()ing in to a local 64-byte buffer.

Limit the maximum number of bytes by the size of the buffer.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/powernv/opal-sysparam.c