From 019453ef118791c1b30ca093b7a8f5395d18503d Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Thu, 3 Jun 2004 10:38:29 -0700 Subject: [PATCH] [PATCH] sparse: more wan annotations --- drivers/net/wan/dlci.c | 2 +- include/linux/if_frad.h | 2 +- include/linux/sdla.h | 2 +- net/socket.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index dd6f0ff29cedc..bad0d418580be 100644 --- a/drivers/net/wan/dlci.c +++ b/drivers/net/wan/dlci.c @@ -454,7 +454,7 @@ static int dlci_del(struct dlci_add *dlci) return(err); } -static int dlci_ioctl(unsigned int cmd, void *arg) +static int dlci_ioctl(unsigned int cmd, void __user *arg) { struct dlci_add add; int err; diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h index 50590033559e5..3c94b17365701 100644 --- a/include/linux/if_frad.h +++ b/include/linux/if_frad.h @@ -191,7 +191,7 @@ struct frad_local int buffer; /* current buffer for S508 firmware */ }; -extern void dlci_ioctl_set(int (*hook)(unsigned int, void *)); +extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *)); #endif /* __KERNEL__ */ diff --git a/include/linux/sdla.h b/include/linux/sdla.h index 44ae55b1c4275..3b6afb8caa423 100644 --- a/include/linux/sdla.h +++ b/include/linux/sdla.h @@ -58,7 +58,7 @@ struct sdla_mem { int addr; int len; - void *data; + void __user *data; }; #define SDLA_START (FRAD_LAST_IOCTL + 7) diff --git a/net/socket.c b/net/socket.c index b10023d9eefd7..d3ec3873277ad 100644 --- a/net/socket.c +++ b/net/socket.c @@ -751,9 +751,9 @@ void vlan_ioctl_set(int (*hook)(void __user *)) EXPORT_SYMBOL(vlan_ioctl_set); static DECLARE_MUTEX(dlci_ioctl_mutex); -static int (*dlci_ioctl_hook)(unsigned int, void *); +static int (*dlci_ioctl_hook)(unsigned int, void __user *); -void dlci_ioctl_set(int (*hook)(unsigned int, void *)) +void dlci_ioctl_set(int (*hook)(unsigned int, void __user *)) { down(&dlci_ioctl_mutex); dlci_ioctl_hook = hook; @@ -832,7 +832,7 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd, if (dlci_ioctl_hook) { down(&dlci_ioctl_mutex); - err = dlci_ioctl_hook(cmd, (void *)arg); + err = dlci_ioctl_hook(cmd, argp); up(&dlci_ioctl_mutex); } break; -- 2.53.0