提交 2fb4423a 编写于 作者: J Jeremy Kerr 提交者: Benjamin Herrenschmidt

powerpc/spufs: Fix incorrect buffer offset in regs write

We need to offset by *pos bytes, not *pos words.
Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 d219889b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册