mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Kepplinger <martink@posteo.de>
To: dan.carpenter@oracle.com
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	forest@alittletooquiet.net, linux-kernel@vger.kernel.org,
	Martin Kepplinger <martink@posteo.de>
Subject: [PATCH v2] staging: vt6655: preserve address space in ethtool_ioctl()
Date: Tue, 17 Jun 2014 14:32:35 +0200	[thread overview]
Message-ID: <1403008355-4163-1-git-send-email-martink@posteo.de> (raw)
In-Reply-To: <20140616075556.GZ5500@mwanda>

Fix the sparse error: cast removes address space of expression and
add __user annotation to the driver's ethtool_ioctl().

Signed-off-by: Martin Kepplinger <martink@posteo.de>
---
Beyond that, how would you include socket.c's ethtool_ioctl() here?

thanks for looking at these tiny changes.

 drivers/staging/vt6655/device_main.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 1d3908d..740690e 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -3067,7 +3067,7 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
 		break;
 
 	case SIOCETHTOOL:
-		return ethtool_ioctl(dev, (void *)rq->ifr_data);
+		return ethtool_ioctl(dev, &rq->ifr_data);
 		// All other calls are currently unsupported
 
 	default:
@@ -3103,7 +3103,7 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
 	return rc;
 }
 
-static int ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
 	u32 ethcmd;
 
-- 
1.7.10.4


  reply	other threads:[~2014-06-17 12:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13 10:11 [PATCH] staging: vt6655: preserve address space by not casting Martin Kepplinger
2014-06-16  7:55 ` Dan Carpenter
2014-06-17 12:32   ` Martin Kepplinger [this message]
2014-06-17 12:40     ` [PATCH v3] staging: vt6655: preserve address space in ethtool_ioctl() Martin Kepplinger
2014-06-19 23:37       ` 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=1403008355-4163-1-git-send-email-martink@posteo.de \
    --to=martink@posteo.de \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --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

all inboxes | Powered by JetHome®