diff options
| author | Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk> | 2004-06-03 07:29:23 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-03 07:29:23 -0700 |
| commit | 45e836f6e19400a17092daf5debbde3ddbfabd8b (patch) | |
| tree | a918219fe200a537470b1e69898110bc566066fd | |
| parent | 6b464d53f2231e2304e1f74917699c783f2529c4 (diff) | |
[PATCH] sparse: appletalk annotation
| -rw-r--r-- | net/appletalk/ddp.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 265d17209610..a46971d14635 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c @@ -673,7 +673,7 @@ static int ddp_device_event(struct notifier_block *this, unsigned long event, /* ioctl calls. Shouldn't even need touching */ /* Device configuration ioctl calls */ -static int atif_ioctl(int cmd, void *arg) +static int atif_ioctl(int cmd, void __user *arg) { static char aarp_mcast[6] = { 0x09, 0x00, 0x00, 0xFF, 0xFF, 0xFF }; struct ifreq atreq; @@ -892,7 +892,7 @@ static int atif_ioctl(int cmd, void *arg) } /* Routing ioctl() calls */ -static int atrtr_ioctl(unsigned int cmd, void *arg) +static int atrtr_ioctl(unsigned int cmd, void __user *arg) { struct rtentry rt; @@ -1769,6 +1769,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) { int rc = -EINVAL; struct sock *sk = sock->sk; + void __user *argp = (void __user *)arg; switch (cmd) { /* Protocol layer */ @@ -1778,7 +1779,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) if (amount < 0) amount = 0; - rc = put_user(amount, (int *)arg); + rc = put_user(amount, (int __user *)argp); break; } case TIOCINQ: { @@ -1791,18 +1792,18 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) if (skb) amount = skb->len - sizeof(struct ddpehdr); - rc = put_user(amount, (int *)arg); + rc = put_user(amount, (int __user *)argp); break; } case SIOCGSTAMP: - rc = sock_get_timestamp(sk, (struct timeval __user *)arg); + rc = sock_get_timestamp(sk, argp); break; /* Routing */ case SIOCADDRT: case SIOCDELRT: rc = -EPERM; if (capable(CAP_NET_ADMIN)) - rc = atrtr_ioctl(cmd, (void *)arg); + rc = atrtr_ioctl(cmd, argp); break; /* Interface */ case SIOCGIFADDR: @@ -1813,7 +1814,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) case SIOCSARP: /* proxy AARP */ case SIOCDARP: /* proxy AARP */ rtnl_lock(); - rc = atif_ioctl(cmd, (void *)arg); + rc = atif_ioctl(cmd, argp); rtnl_unlock(); break; /* Physical layer ioctl calls */ @@ -1829,7 +1830,7 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) case SIOCGIFCOUNT: case SIOCGIFINDEX: case SIOCGIFNAME: - rc = dev_ioctl(cmd, (void __user *)arg); + rc = dev_ioctl(cmd, argp); break; } |
