netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: netdev@oss.sgi.com
Cc: ncorbic@sangoma.com, davem@redhat.com
Subject: [PATCH] janitor: remove verify_area() in net/wan/sbni
Date: Fri, 3 Oct 2003 21:35:17 -0700	[thread overview]
Message-ID: <20031003213517.6700a095.rddunlap@osdl.org> (raw)

Hi,
Please apply to 2.6.0-test6-current.

Thanks,
--
~Randy


From: Domen Puncer <domen@coderock.org>
Subject: [Kernel-janitors] [PATCH] updated: verify_area:
 	drivers/net/wan/sbni.c

Someone added error checking to copy_*_user, so this [earlier] patch
didn't apply.

Removed unnecessary verify_area.



 linux-260-test6-kj1-rddunlap/drivers/net/wan/sbni.c |   20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diff -puN drivers/net/wan/sbni.c~net_wan_sbni_verify drivers/net/wan/sbni.c
--- linux-260-test6-kj1/drivers/net/wan/sbni.c~net_wan_sbni_verify	2003-09-29 17:39:09.000000000 -0700
+++ linux-260-test6-kj1-rddunlap/drivers/net/wan/sbni.c	2003-09-29 17:39:09.000000000 -0700
@@ -1300,12 +1300,9 @@ sbni_ioctl( struct net_device  *dev,  st
   
 	switch( cmd ) {
 	case  SIOCDEVGETINSTATS :
-		error = verify_area( VERIFY_WRITE, ifr->ifr_data,
-				     sizeof(struct sbni_in_stats) );
-		if( !error )
-			if (copy_to_user( ifr->ifr_data, &nl->in_stats,
-				      sizeof(struct sbni_in_stats) ))
-				return -EFAULT;
+		if (copy_to_user( ifr->ifr_data, &nl->in_stats,
+					sizeof(struct sbni_in_stats) ))
+			error = -EFAULT;
 		break;
 
 	case  SIOCDEVRESINSTATS :
@@ -1321,11 +1318,8 @@ sbni_ioctl( struct net_device  *dev,  st
 		flags.rxl	= nl->cur_rxl_index;
 		flags.fixed_rxl	= nl->delta_rxl == 0;
 
-		error = verify_area( VERIFY_WRITE, ifr->ifr_data,
-				     sizeof flags );
-		if( !error )
-			if (copy_to_user( ifr->ifr_data, &flags, sizeof flags ))
-				return -EFAULT;
+		if (copy_to_user( ifr->ifr_data, &flags, sizeof flags ))
+			error = -EFAULT;
 		break;
 
 	case  SIOCDEVSHWSTATE :
@@ -1353,10 +1347,6 @@ sbni_ioctl( struct net_device  *dev,  st
 		if( current->euid != 0 )	/* root only */
 			return  -EPERM;
 
-		if( (error = verify_area( VERIFY_READ, ifr->ifr_data,
-					  sizeof slave_name )) != 0 )
-			return  error;
-
 		if (copy_from_user( slave_name, ifr->ifr_data, sizeof slave_name ))
 			return -EFAULT;
 		slave_dev = dev_get_by_name( slave_name );

_

             reply	other threads:[~2003-10-04  4:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-04  4:35 Randy.Dunlap [this message]
2003-10-04  6:10 ` [PATCH] janitor: remove verify_area() in net/wan/sbni David S. Miller

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=20031003213517.6700a095.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=davem@redhat.com \
    --cc=ncorbic@sangoma.com \
    --cc=netdev@oss.sgi.com \
    /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;
as well as URLs for NNTP newsgroup(s).