From: H Hartley Sweeten <hartleys@visionengravers.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: <devel@driverdev.osuosl.org>, <gregkh@suse.de>, <ss@aao.gov.au>
Subject: [PATCH] Staging: dt3155: Remove copy_to_user for ioctl's DT3155_{STOP|START}
Date: Tue, 20 Jul 2010 17:57:52 -0700 [thread overview]
Message-ID: <201007201757.52928.hartleys@visionengravers.com> (raw)
The ioctl's DT3155_STOP and DT3155_START are defined with the macro
_IO indicating that they have no parameters. They should not be using
copy_to_user to return data to user space.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Scott Smedley <ss@aao.gov.au>
---
diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c
index fed7e62..5eb1bcd 100644
--- a/drivers/staging/dt3155/dt3155_drv.c
+++ b/drivers/staging/dt3155/dt3155_drv.c
@@ -570,8 +570,6 @@ static int dt3155_ioctl(struct inode *inode,
return 0;
quick_stop(minor);
- if (copy_to_user(up, dts, sizeof(*dts)))
- return -EFAULT;
return 0;
}
case DT3155_START:
@@ -593,8 +591,6 @@ static int dt3155_ioctl(struct inode *inode,
}
dt3155_init_isr(minor);
- if (copy_to_user(up, dts, sizeof(*dts)))
- return -EFAULT;
return 0;
}
default:
next reply other threads:[~2010-07-21 0:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-21 0:57 H Hartley Sweeten [this message]
2010-07-21 7:57 ` [PATCH] Staging: dt3155: Remove copy_to_user for ioctl's DT3155_{STOP|START} Jiri Slaby
2010-07-22 17:55 ` Greg KH
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=201007201757.52928.hartleys@visionengravers.com \
--to=hartleys@visionengravers.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ss@aao.gov.au \
/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