Skip to content

Commit

Permalink
powerpc/spufs: Fix incorrect buffer offset in regs write
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeremy Kerr authored and Benjamin Herrenschmidt committed Mar 11, 2009
1 parent d219889 commit 2fb4423
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/cell/spufs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2fb4423

Please sign in to comment.