Skip to contentSkip to conversation

misannotation in pppol2tp

PATCH In review Al Viro 2 participants 2 messages Jul 26, 2007 – Jul 28, 2007 Network drivers

lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 1/1 misannotation in pppol2tp

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

---
 drivers/net/pppol2tp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/pppol2tp.c +2 -2
index f871760..266e8b3 100644
@@ -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;
 
Signature · 1 line
1.5.3.GIT
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Al Viro

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

Thanks Al.

Signature · 4 lines
James Chapman
Katalix Systems Ltd
http://www.katalix.com
Catalysts for your Embedded Linux software development