mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 05:24:39 +01:00
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>
This commit is contained in:
parent
d219889b76
commit
2fb4423aa3
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue