public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] misannotation in pppol2tp
@ 2007-07-26 16:35 Al Viro
  2007-07-27  8:43 ` James Chapman
  0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2007-07-26 16:35 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, jchapman, davem


Address of auto variable is not a userland pointer.  A good thing, too,
since if pppol2tp_tunnel_getsockopt() would _really_ get a userland pointer
as argument, it would be an instant roothole...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 drivers/net/pppol2tp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index f871760..266e8b3 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -2054,7 +2054,7 @@ end:
  */
 static int pppol2tp_tunnel_getsockopt(struct sock *sk,
 				      struct pppol2tp_tunnel *tunnel,
-				      int optname, int __user *val)
+				      int optname, int *val)
 {
 	int err = 0;
 
@@ -2077,7 +2077,7 @@ static int pppol2tp_tunnel_getsockopt(struct sock *sk,
  */
 static int pppol2tp_session_getsockopt(struct sock *sk,
 				       struct pppol2tp_session *session,
-				       int optname, int __user *val)
+				       int optname, int *val)
 {
 	int err = 0;
 
-- 
1.5.3.GIT



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

* Re: [PATCH] misannotation in pppol2tp
  2007-07-26 16:35 [PATCH] misannotation in pppol2tp Al Viro
@ 2007-07-27  8:43 ` James Chapman
  0 siblings, 0 replies; 2+ messages in thread
From: James Chapman @ 2007-07-27  8:43 UTC (permalink / raw)
  To: Al Viro; +Cc: torvalds, linux-kernel, davem

Al Viro wrote:
> Address of auto variable is not a userland pointer.  A good thing, too,
> since if pppol2tp_tunnel_getsockopt() would _really_ get a userland pointer
> as argument, it would be an instant roothole...
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: James Chapman <jchapman@katalix.com>

Thanks Al.

-- 
James Chapman
Katalix Systems Ltd
http://www.katalix.com
Catalysts for your Embedded Linux software development


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

end of thread, other threads:[~2007-07-28  0:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-26 16:35 [PATCH] misannotation in pppol2tp Al Viro
2007-07-27  8:43 ` James Chapman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox