]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging/lustre/llite: Properly mark ll_obd_statfs argument as __user
authorOleg Drokin <green@linuxhacker.ru>
Sun, 3 Jan 2016 17:05:47 +0000 (12:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2016 22:34:00 +0000 (14:34 -0800)
Also update all callers.
This fixes a bunch of address space mismatch warnings from sparse.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/dir.c
drivers/staging/lustre/lustre/llite/file.c
drivers/staging/lustre/lustre/llite/llite_internal.h
drivers/staging/lustre/lustre/llite/llite_lib.c

index 5cfe8bb5fce2e23ed3b4225798d59025b8f0af4f..5b41162c7b354b4d72f65fd4b58c1dfd0dae9aba 100644 (file)
@@ -1434,7 +1434,7 @@ free_lmv:
        case LL_IOC_LOV_SWAP_LAYOUTS:
                return -EPERM;
        case LL_IOC_OBD_STATFS:
-               return ll_obd_statfs(inode, (void *)arg);
+               return ll_obd_statfs(inode, (void __user *)arg);
        case LL_IOC_LOV_GETSTRIPE:
        case LL_IOC_MDC_GETINFO:
        case IOC_MDC_GETFILEINFO:
index c91b5b4111c926890a41c6d4095b4a4471ef8b59..6652fdf2ca8a28f085df273a5d2d08d9430265cb 100644 (file)
@@ -2278,7 +2278,7 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        case LL_IOC_GROUP_UNLOCK:
                return ll_put_grouplock(inode, file, arg);
        case IOC_OBD_STATFS:
-               return ll_obd_statfs(inode, (void *)arg);
+               return ll_obd_statfs(inode, (void __user *)arg);
 
        /* We need to special case any other ioctls we want to handle,
         * to send them to the MDS/OST as appropriate and to properly
index e73024778808a792ae7f7eaf4d0475750fadbad1..29c325d5c4e6474475f7b7606ad5370ef7c7e38b 100644 (file)
@@ -782,7 +782,7 @@ int ll_show_options(struct seq_file *seq, struct dentry *dentry);
 void ll_dirty_page_discard_warn(struct page *page, int ioret);
 int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req,
                  struct super_block *, struct lookup_intent *);
-int ll_obd_statfs(struct inode *inode, void *arg);
+int ll_obd_statfs(struct inode *inode, void __user *arg);
 int ll_get_max_mdsize(struct ll_sb_info *sbi, int *max_mdsize);
 int ll_get_default_mdsize(struct ll_sb_info *sbi, int *default_mdsize);
 int ll_process_config(struct lustre_cfg *lcfg);
index efff8307fb0600a0ddc38f150454c7e2af120121..68fa766adcbbba45b17c4288d33b5fb777cf9287 100644 (file)
@@ -2019,7 +2019,7 @@ cleanup:
        return rc;
 }
 
-int ll_obd_statfs(struct inode *inode, void *arg)
+int ll_obd_statfs(struct inode *inode, void __user *arg)
 {
        struct ll_sb_info *sbi = NULL;
        struct obd_export *exp;