All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Nyberg <alexn@telia.com>
To: kernel-janitors@vger.kernel.org
Subject: [Kernel-janitors] Sparse checks #3
Date: Tue, 15 Jun 2004 17:12:50 +0000	[thread overview]
Message-ID: <1087319570.676.50.camel@boxen> (raw)

[-- Attachment #1: Type: text/plain, Size: 2342 bytes --]

Sparse checkings for arch/um/drivers/ubd_kern.c

Signed-off-by: Alexander Nyberg <alexn@telia.com>

===== arch/um/drivers/ubd_kern.c 1.35 vs edited =====
--- 1.35/arch/um/drivers/ubd_kern.c     2003-09-05 13:31:49 +02:00
+++ edited/arch/um/drivers/ubd_kern.c   2004-06-15 16:20:25 +02:00
@@ -868,7 +868,7 @@
 static int ubd_ioctl(struct inode * inode, struct file * file,
                     unsigned int cmd, unsigned long arg)
 {
-       struct hd_geometry *loc = (struct hd_geometry *) arg;
+       struct hd_geometry __user *loc = (struct hd_geometry __user *) arg;
        struct ubd *dev = inode->i_bdev->bd_disk->private_data;
        int err;
        struct hd_driveid ubd_id = {
@@ -896,14 +896,14 @@

        case HDIO_GET_UNMASKINTR:
                if(!arg)  return(-EINVAL);
-               err = verify_area(VERIFY_WRITE, (long *) arg, sizeof(long));
+               err = verify_area(VERIFY_WRITE, (long __user *) arg, sizeof(long));
                if(err)
                        return(err);
                return(0);

        case HDIO_GET_MULTCOUNT:
                if(!arg)  return(-EINVAL);
-               err = verify_area(VERIFY_WRITE, (long *) arg, sizeof(long));
+               err = verify_area(VERIFY_WRITE, (long __user *) arg, sizeof(long));
                if(err)
                        return(err);
                return(0);
@@ -916,19 +916,19 @@

        case HDIO_GET_IDENTITY:
                ubd_id.cyls = dev->size / (128 * 32 * 512);
-               if(copy_to_user((char *) arg, (char *) &ubd_id,
+               if(copy_to_user((char __user *) arg, (char *) &ubd_id,
                                 sizeof(ubd_id)))
                        return(-EFAULT);
                return(0);

        case CDROMVOLREAD:
-               if(copy_from_user(&volume, (char *) arg, sizeof(volume)))
+               if(copy_from_user(&volume, (char __user *) arg, sizeof(volume)))
                        return(-EFAULT);
                volume.channel0 = 255;
                volume.channel1 = 255;
                volume.channel2 = 255;
                volume.channel3 = 255;
-               if(copy_to_user((char *) arg, &volume, sizeof(volume)))
+               if(copy_to_user((char __user *) arg, &volume, sizeof(volume)))
                        return(-EFAULT);
                return(0);
        }


[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

                 reply	other threads:[~2004-06-15 17:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1087319570.676.50.camel@boxen \
    --to=alexn@telia.com \
    --cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.