orangefs: specify user pointers when using dev_map_desc and bufmap
authorMike Marshall <hubcap@omnibond.com>
Fri, 1 Jun 2018 16:19:45 +0000 (12:19 -0400)
committerMike Marshall <hubcap@omnibond.com>
Fri, 1 Jun 2018 18:51:36 +0000 (14:51 -0400)
Sparse lead me to the dev_map_desc one and Al Viro lead me to the bufmap
one.

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/orangefs-bufmap.c
fs/orangefs/protocol.h

index e3302f8..c4699a1 100644 (file)
@@ -138,7 +138,7 @@ static int get(struct slot_map *m)
 
 /* used to describe mapped buffers */
 struct orangefs_bufmap_desc {
-       void *uaddr;                    /* user space address pointer */
+       void __user *uaddr;             /* user space address pointer */
        struct page **page_array;       /* array of mapped pages */
        int array_count;                /* size of above arrays */
        struct list_head list_link;
index 61ee8d6..d403cf2 100644 (file)
@@ -342,7 +342,7 @@ enum {
  * that may be 32 bit!
  */
 struct ORANGEFS_dev_map_desc {
-       void *ptr;
+       void __user *ptr;
        __s32 total_size;
        __s32 size;
        __s32 count;