public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: mikem <mikem@beardog.cca.cpqcorp.net>
To: akpm@osdl.org, axboe@suse.de
Cc: linux-kernel@vger.kernel.org
Subject: cciss update [1/8] ioctl32 fix
Date: Tue, 10 Aug 2004 11:01:40 -0500	[thread overview]
Message-ID: <20040810160140.GA19909@beardog.cca.cpqcorp.net> (raw)

My latest updates are not in 2.6.8-rc4. So I am resubmitting them.

Patch 1 of 8
This patch fixes our usage of copy_to_user. We were passing in the size
of the address rather than the size of the struct.
Patch applies to 2.6.8-rc4. Please apply in order.

Thanks,
mikem
-------------------------------------------------------------------------------
diff -burpN lx268-rc3.orig/drivers/block/cciss.c lx268-rc3/drivers/block/cciss.c
--- lx268-rc3.orig/drivers/block/cciss.c	2004-08-05 09:55:58.023683000 -0500
+++ lx268-rc3/drivers/block/cciss.c	2004-08-05 10:22:43.290646176 -0500
@@ -578,7 +578,7 @@ int cciss_ioctl32_passthru(unsigned int 
 	err = sys_ioctl(fd, CCISS_PASSTHRU, (unsigned long) p);
 	if (err)
 		return err;
-	err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(&arg32->error_info));
+	err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(arg32->error_info));
 	if (err)
 		return -EFAULT;
 	return err;
@@ -610,7 +610,7 @@ int cciss_ioctl32_big_passthru(unsigned 
 	err = sys_ioctl(fd, CCISS_BIG_PASSTHRU, (unsigned long) p);
 	if (err)
 		return err;
-	err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(&arg32->error_info));
+	err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(arg32->error_info));
 	if (err)
 		return -EFAULT;
 	return err;

             reply	other threads:[~2004-08-10 16:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-10 16:01 mikem [this message]
2004-08-10 16:25 ` cciss update [1/8] ioctl32 fix Jens Axboe

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=20040810160140.GA19909@beardog.cca.cpqcorp.net \
    --to=mikem@beardog.cca.cpqcorp.net \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.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