Commit e48caf2c authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: netrom annotation

parent 4e8a8c6d
......@@ -206,7 +206,7 @@ extern void nr_check_iframes_acked(struct sock *, unsigned short);
extern void nr_rt_device_down(struct net_device *);
extern struct net_device *nr_dev_first(void);
extern struct net_device *nr_dev_get(ax25_address *);
extern int nr_rt_ioctl(unsigned int, void *);
extern int nr_rt_ioctl(unsigned int, void __user *);
extern void nr_link_failed(ax25_cb *, int);
extern int nr_route_frame(struct sk_buff *, ax25_cb *);
extern struct file_operations nr_nodes_fops;
......
......@@ -1176,6 +1176,7 @@ static int nr_recvmsg(struct kiocb *iocb, struct socket *sock,
static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
struct sock *sk = sock->sk;
void __user *argp = (void __user *)arg;
int ret;
lock_sock(sk);
......@@ -1186,7 +1187,7 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
if (amount < 0)
amount = 0;
release_sock(sk);
return put_user(amount, (int *)arg);
return put_user(amount, (int __user *)argp);
}
case TIOCINQ: {
......@@ -1196,13 +1197,13 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
if ((skb = skb_peek(&sk->sk_receive_queue)) != NULL)
amount = skb->len;
release_sock(sk);
return put_user(amount, (int *)arg);
return put_user(amount, (int __user *)argp);
}
case SIOCGSTAMP:
ret = -EINVAL;
if (sk != NULL)
ret = sock_get_timestamp(sk, (struct timeval __user *)arg);
ret = sock_get_timestamp(sk, argp);
release_sock(sk);
return ret;
......@@ -1224,11 +1225,11 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCNRDECOBS:
release_sock(sk);
if (!capable(CAP_NET_ADMIN)) return -EPERM;
return nr_rt_ioctl(cmd, (void *)arg);
return nr_rt_ioctl(cmd, argp);
default:
release_sock(sk);
return dev_ioctl(cmd, (void __user *)arg);
return dev_ioctl(cmd, argp);
}
release_sock(sk);
......
......@@ -647,7 +647,7 @@ static ax25_digi *nr_call_to_digi(int ndigis, ax25_address *digipeaters)
/*
* Handle the ioctls that control the routing functions.
*/
int nr_rt_ioctl(unsigned int cmd, void *arg)
int nr_rt_ioctl(unsigned int cmd, void __user *arg)
{
struct nr_route_struct nr_route;
struct net_device *dev;
......
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