diff options
author | Jeremy Kerr | 2009-03-03 19:39:32 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt | 2009-03-11 17:11:32 +1100 |
commit | 2fb4423aa38b598fa688bbd53a835bb7628c445b (patch) | |
tree | 3d6797938459bde5008bf6b3fa45a95a81b96fc0 /arch/powerpc/platforms | |
parent | d219889b769a56901c9a916187ee0af95e6ff8a6 (diff) |
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')
-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 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); |