diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2009-03-03 19:39:32 (GMT) |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-03-11 06:11:32 (GMT) |
commit | 2fb4423aa38b598fa688bbd53a835bb7628c445b (patch) | |
tree | 3d6797938459bde5008bf6b3fa45a95a81b96fc0 /arch/powerpc/platforms/cell | |
parent | d219889b769a56901c9a916187ee0af95e6ff8a6 (diff) | |
download | linux-fsl-qoriq-2fb4423aa38b598fa688bbd53a835bb7628c445b.tar.xz |
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/powerpc/platforms/cell')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/file.c | 2 |
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 be0120d..d6a519e 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); |