Whamcloud - gitweb
LU-5396 libcfs: add sparse annotation __user wherever needed
[fs/lustre-release.git] / libcfs / libcfs / module.c
index 16d0a16..ee678ec 100644 (file)
@@ -43,6 +43,7 @@
 #include <lnet/lib-lnet.h>
 #include <lnet/lib-dlc.h>
 #include <lnet/lnet.h>
+#include <lnet/nidstr.h>
 #include "tracefile.h"
 
 void
@@ -222,7 +223,7 @@ int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand)
 EXPORT_SYMBOL(libcfs_deregister_ioctl);
 
 static int libcfs_ioctl_handle(struct cfs_psdev_file *pfile, unsigned long cmd,
-                              void *arg, struct libcfs_ioctl_hdr *hdr)
+                              void __user *arg, struct libcfs_ioctl_hdr *hdr)
 {
        struct libcfs_ioctl_data *data = NULL;
        int err;
@@ -309,7 +310,7 @@ static int libcfs_ioctl_handle(struct cfs_psdev_file *pfile, unsigned long cmd,
 }
 
 static int libcfs_ioctl(struct cfs_psdev_file *pfile,
-                       unsigned long cmd, void *arg)
+                       unsigned long cmd, void __user *arg)
 {
        struct libcfs_ioctl_hdr *hdr;
        int err = 0;