public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@ozlabs.org>
To: <cbe-oss-dev@ozlabs.org>
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH] powerpc/spufs: Fix incorrect buffer offset in regs write
Date: Wed, 04 Mar 2009 16:39:32 +1100	[thread overview]
Message-ID: <1236145172.189228.314429009881.1.gpush@pingu> (raw)

We need to offset by *pos bytes, not *pos words.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

---
 arch/powerpc/platforms/cell/spufs/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 83ef889..6b10877 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);

             reply	other threads:[~2009-03-04  5:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-04  5:39 Jeremy Kerr [this message]
2009-03-04  8:36 ` [Cbe-oss-dev] [PATCH] powerpc/spufs: Fix incorrect buffer offset in regs write Geert Uytterhoeven
2009-03-04 23:32   ` Jeremy Kerr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1236145172.189228.314429009881.1.gpush@pingu \
    --to=jk@ozlabs.org \
    --cc=cbe-oss-dev@ozlabs.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox