Commit 296cf45d authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[IPV4]: ip_rt_ioctl argument is user pointer.

The function ip_rt_ioctl expects a pointer to a user route structure, so define
it that way and cast as appropriate.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent c51fd78e
......@@ -129,7 +129,7 @@ extern void ip_rt_send_redirect(struct sk_buff *skb);
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);
......
......@@ -848,7 +848,7 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
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:
......
......@@ -235,7 +235,7 @@ int fib_validate_source(u32 src, u32 dst, u8 tos, int oif,
* 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;
......
......@@ -272,7 +272,7 @@ static int __init ic_dev_ioctl(unsigned int cmd, struct ifreq *arg)
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 @@ static int __init ic_route_ioctl(unsigned int cmd, struct rtentry *arg)
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment