diff options
| author | Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk> | 2004-06-03 10:38:48 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-03 10:38:48 -0700 |
| commit | 73a660203f2d0625e1cec41d3d4caf23ecf3be7e (patch) | |
| tree | add2382bf505125731478be03af48e60af2ea066 | |
| parent | 9e1b30a366b9dd66b4ff0ce56b243778bc0dddee (diff) | |
[PATCH] sparse: rest of net/* annotations (in this patchset, that is ;-)
| -rw-r--r-- | include/linux/if.h | 4 | ||||
| -rw-r--r-- | net/core/iovec.c | 2 | ||||
| -rw-r--r-- | net/core/pktgen.c | 8 | ||||
| -rw-r--r-- | net/ipv4/ipvs/ip_vs_ctl.c | 4 | ||||
| -rw-r--r-- | net/socket.c | 10 |
5 files changed, 14 insertions, 14 deletions
diff --git a/include/linux/if.h b/include/linux/if.h index 1e99c4f6bd97..296a6c21ec71 100644 --- a/include/linux/if.h +++ b/include/linux/if.h @@ -182,8 +182,8 @@ struct ifconf int ifc_len; /* size of buffer */ union { - char * ifcu_buf; - struct ifreq *ifcu_req; + char __user *ifcu_buf; + struct ifreq __user *ifcu_req; } ifc_ifcu; }; #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ diff --git a/net/core/iovec.c b/net/core/iovec.c index 0f3c8b60bb86..89de9355d99e 100644 --- a/net/core/iovec.c +++ b/net/core/iovec.c @@ -157,7 +157,7 @@ int memcpy_fromiovecend(unsigned char *kdata, struct iovec *iov, int offset, } while (len > 0) { - u8 *base = iov->iov_base + offset; + u8 __user *base = iov->iov_base + offset; int copy = min_t(unsigned int, len, iov->iov_len - offset); offset = 0; diff --git a/net/core/pktgen.c b/net/core/pktgen.c index b1b450cfdf0f..3821caa36870 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -870,7 +870,7 @@ static int proc_read(char *buf , char **start, off_t offset, return p - buf; } -static int count_trail_chars(const char *user_buffer, unsigned int maxlen) +static int count_trail_chars(const char __user *user_buffer, unsigned int maxlen) { int i; @@ -895,7 +895,7 @@ done: return i; } -static unsigned long num_arg(const char *user_buffer, unsigned long maxlen, +static unsigned long num_arg(const char __user *user_buffer, unsigned long maxlen, unsigned long *num) { int i = 0; @@ -916,7 +916,7 @@ static unsigned long num_arg(const char *user_buffer, unsigned long maxlen, return i; } -static int strn_len(const char *user_buffer, unsigned int maxlen) +static int strn_len(const char __user *user_buffer, unsigned int maxlen) { int i = 0; @@ -940,7 +940,7 @@ done_str: return i; } -static int proc_write(struct file *file, const char *user_buffer, +static int proc_write(struct file *file, const char __user *user_buffer, unsigned long count, void *data) { int i = 0, max, len; diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c index 8f2d43fc5f43..5df55ca9eef0 100644 --- a/net/ipv4/ipvs/ip_vs_ctl.c +++ b/net/ipv4/ipvs/ip_vs_ctl.c @@ -1347,7 +1347,7 @@ static int ip_vs_zero_all(void) static int proc_do_defense_mode(ctl_table *table, int write, struct file * filp, - void *buffer, size_t *lenp) + void __user *buffer, size_t *lenp) { int *valp = table->data; int val = *valp; @@ -1370,7 +1370,7 @@ proc_do_defense_mode(ctl_table *table, int write, struct file * filp, static int proc_do_sync_threshold(ctl_table *table, int write, struct file *filp, - void *buffer, size_t *lenp) + void __user *buffer, size_t *lenp) { int *valp = table->data; int val[2]; diff --git a/net/socket.c b/net/socket.c index d3ec3873277a..1aa2ce2a3139 100644 --- a/net/socket.c +++ b/net/socket.c @@ -776,24 +776,24 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unlock_kernel(); sock = SOCKET_I(inode); if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { - err = dev_ioctl(cmd, (void __user *)arg); + err = dev_ioctl(cmd, argp); } else #ifdef WIRELESS_EXT if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) { - err = dev_ioctl(cmd, (void __user *)arg); + err = dev_ioctl(cmd, argp); } else #endif /* WIRELESS_EXT */ switch (cmd) { case FIOSETOWN: case SIOCSPGRP: err = -EFAULT; - if (get_user(pid, (int __user *)arg)) + if (get_user(pid, (int __user *)argp)) break; err = f_setown(sock->file, pid, 1); break; case FIOGETOWN: case SIOCGPGRP: - err = put_user(sock->file->f_owner.pid, (int __user *)arg); + err = put_user(sock->file->f_owner.pid, (int __user *)argp); break; case SIOCGIFBR: case SIOCSIFBR: @@ -822,7 +822,7 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd, case SIOCGIFDIVERT: case SIOCSIFDIVERT: /* Convert this to call through a hook */ - err = divert_ioctl(cmd, (struct divert_cf *)arg); + err = divert_ioctl(cmd, argp); break; case SIOCADDDLCI: case SIOCDELDLCI: |
