summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2009-03-03 20:39:32 +0100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-11 07:11:32 +0100
commit2fb4423aa38b598fa688bbd53a835bb7628c445b (patch)
tree3d6797938459bde5008bf6b3fa45a95a81b96fc0 /arch
parentpowerpc/spufs: Check file offset before calculating write size in fixed-sized... (diff)
downloadlinux-2fb4423aa38b598fa688bbd53a835bb7628c445b.tar.xz
linux-2fb4423aa38b598fa688bbd53a835bb7628c445b.zip
powerpc/spufs: Fix incorrect buffer offset in regs write
We need to offset by *pos bytes, not *pos words. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index be0120d9b50a..d6a519e6e1c1 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -578,7 +578,7 @@ spufs_regs_write(struct file *file, const char __user *buffer,
if (ret)
return ret;
- ret = copy_from_user(lscsa->gprs + *pos - size,
+ ret = copy_from_user((char *)lscsa->gprs + *pos - size,
buffer, size) ? -EFAULT : size;
spu_release_saved(ctx);