* [PATCH] [sparse] ip_rt_ioctl argument is user pointer
@ 2004-06-22 23:00 Stephen Hemminger
2004-06-23 0:11 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2004-06-22 23:00 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
The function ip_rt_ioctl expects a pointer to a user route structure, so define
it that way and cast as appropriate.
diff -Nru a/include/net/route.h b/include/net/route.h
--- a/include/net/route.h 2004-06-22 15:57:28 -07:00
+++ b/include/net/route.h 2004-06-22 15:57:28 -07:00
@@ -129,7 +129,7 @@
extern unsigned inet_addr_type(u32 addr);
extern void ip_rt_multicast_event(struct in_device *);
-extern int ip_rt_ioctl(unsigned int cmd, void *arg);
+extern int ip_rt_ioctl(unsigned int cmd, void __user *arg);
extern void ip_rt_get_source(u8 *src, struct rtable *rt);
extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb);
diff -Nru a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
--- a/net/ipv4/af_inet.c 2004-06-22 15:57:28 -07:00
+++ b/net/ipv4/af_inet.c 2004-06-22 15:57:28 -07:00
@@ -848,7 +848,7 @@
case SIOCADDRT:
case SIOCDELRT:
case SIOCRTMSG:
- err = ip_rt_ioctl(cmd, (void *)arg);
+ err = ip_rt_ioctl(cmd, (void __user *)arg);
break;
case SIOCDARP:
case SIOCGARP:
diff -Nru a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
--- a/net/ipv4/fib_frontend.c 2004-06-22 15:57:28 -07:00
+++ b/net/ipv4/fib_frontend.c 2004-06-22 15:57:28 -07:00
@@ -235,7 +235,7 @@
* Handle IP routing ioctl calls. These are used to manipulate the routing tables
*/
-int ip_rt_ioctl(unsigned int cmd, void *arg)
+int ip_rt_ioctl(unsigned int cmd, void __user *arg)
{
int err;
struct kern_rta rta;
diff -Nru a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
--- a/net/ipv4/ipconfig.c 2004-06-22 15:57:28 -07:00
+++ b/net/ipv4/ipconfig.c 2004-06-22 15:57:28 -07:00
@@ -272,7 +272,7 @@
mm_segment_t oldfs = get_fs();
set_fs(get_ds());
- res = devinet_ioctl(cmd, arg);
+ res = devinet_ioctl(cmd, (struct ifreq __user *) arg);
set_fs(oldfs);
return res;
}
@@ -283,7 +283,7 @@
mm_segment_t oldfs = get_fs();
set_fs(get_ds());
- res = ip_rt_ioctl(cmd, arg);
+ res = ip_rt_ioctl(cmd, (void __user *) arg);
set_fs(oldfs);
return res;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [sparse] ip_rt_ioctl argument is user pointer
2004-06-22 23:00 [PATCH] [sparse] ip_rt_ioctl argument is user pointer Stephen Hemminger
@ 2004-06-23 0:11 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-06-23 0:11 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
On Tue, 22 Jun 2004 16:00:22 -0700
Stephen Hemminger <shemminger@osdl.org> wrote:
> The function ip_rt_ioctl expects a pointer to a user route structure, so define
> it that way and cast as appropriate.
Applied, thanks Stephen.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-23 0:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-22 23:00 [PATCH] [sparse] ip_rt_ioctl argument is user pointer Stephen Hemminger
2004-06-23 0:11 ` 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).