Home
last modified time | relevance | path

Searched hist:d219889b (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/arch/powerpc/platforms/cell/spufs/
H A Dfile.cd219889b Tue Mar 03 13:38:07 CST 2009 Jeremy Kerr <jk@ozlabs.org> powerpc/spufs: Check file offset before calculating write size in fixed-sized files

Based on an original patch from Roel Kluin <roel.kluin@gmail.com>.

The write size calculated during regs and fpcr writes may currently
go negative. Because size is unsigned, this will wrap, and our
check for EFBIG will fail.

Instead, do the check for EFBIG before subtracting from size.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
d219889b Tue Mar 03 13:38:07 CST 2009 Jeremy Kerr <jk@ozlabs.org> powerpc/spufs: Check file offset before calculating write size in fixed-sized files

Based on an original patch from Roel Kluin <roel.kluin@gmail.com>.

The write size calculated during regs and fpcr writes may currently
go negative. Because size is unsigned, this will wrap, and our
check for EFBIG will fail.

Instead, do the check for EFBIG before subtracting from size.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>