netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] janitor: remove verify_area() in net/wan/sbni
@ 2003-10-04  4:35 Randy.Dunlap
  2003-10-04  6:10 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Randy.Dunlap @ 2003-10-04  4:35 UTC (permalink / raw)
  To: netdev; +Cc: ncorbic, davem

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 );

_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] janitor: remove verify_area() in net/wan/sbni
  2003-10-04  4:35 [PATCH] janitor: remove verify_area() in net/wan/sbni Randy.Dunlap
@ 2003-10-04  6:10 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2003-10-04  6:10 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: netdev, ncorbic

On Fri, 3 Oct 2003 21:35:17 -0700
"Randy.Dunlap" <rddunlap@osdl.org> wrote:

> Please apply to 2.6.0-test6-current.

Applied, thanks Randy.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-04  6:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-04  4:35 [PATCH] janitor: remove verify_area() in net/wan/sbni Randy.Dunlap
2003-10-04  6:10 ` David S. Miller

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).