Whamcloud - gitweb
LU-7623 Update obd iocontrol methods with __user attribute 81/17781/5
authorOleg Drokin <oleg.drokin@intel.com>
Thu, 4 Feb 2016 14:21:22 +0000 (09:21 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 5 Feb 2016 16:52:34 +0000 (16:52 +0000)
lmv_iocontrol, osc_iocontrol, mdt_iocontrol, mgs_iocontrol, ofd_iocontrol,
osc_iocontrol, osp_iocontrol and echo_client_brw_ioctl were somehow missing
the __user attribute for uarg.

Change-Id: I10603823f5856fee6ca48c2aea03273e9d29144e
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/17781
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
lustre/lmv/lmv_obd.c
lustre/mdt/mdt_handler.c
lustre/mgs/mgs_handler.c
lustre/obdecho/echo_client.c
lustre/ofd/ofd_obd.c
lustre/osc/osc_request.c
lustre/osp/osp_dev.c

index 3cde2fd..e6d6511 100644 (file)
@@ -905,7 +905,7 @@ static int lmv_hsm_ct_register(struct lmv_obd *lmv, unsigned int cmd, int len,
 
 
 static int lmv_iocontrol(unsigned int cmd, struct obd_export *exp,
 
 
 static int lmv_iocontrol(unsigned int cmd, struct obd_export *exp,
-                         int len, void *karg, void *uarg)
+                        int len, void *karg, void __user *uarg)
 {
        struct obd_device       *obddev = class_exp2obd(exp);
        struct lmv_obd          *lmv = &obddev->u.lmv;
 {
        struct obd_device       *obddev = class_exp2obd(exp);
        struct lmv_obd          *lmv = &obddev->u.lmv;
index 3035202..9ffd9c7 100644 (file)
@@ -1574,7 +1574,7 @@ out_shrink:
 }
 
 static int mdt_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 }
 
 static int mdt_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
-                         void *karg, void *uarg);
+                        void *karg, void __user *uarg);
 
 static int mdt_set_info(struct tgt_session_info *tsi)
 {
 
 static int mdt_set_info(struct tgt_session_info *tsi)
 {
@@ -5710,7 +5710,7 @@ static int mdt_ioc_version_get(struct mdt_thread_info *mti, void *karg)
 
 /* ioctls on obd dev */
 static int mdt_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 
 /* ioctls on obd dev */
 static int mdt_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
-                         void *karg, void *uarg)
+                        void *karg, void __user *uarg)
 {
         struct lu_env      env;
         struct obd_device *obd = exp->exp_obd;
 {
         struct lu_env      env;
         struct obd_device *obd = exp->exp_obd;
index 316d963..f1a643e 100644 (file)
@@ -863,7 +863,7 @@ out_pool:
 
 /* from mdt_iocontrol */
 static int mgs_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 
 /* from mdt_iocontrol */
 static int mgs_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
-                        void *karg, void *uarg)
+                        void *karg, void __user *uarg)
 {
        struct mgs_device *mgs = exp2mgs_dev(exp);
         struct obd_ioctl_data *data = karg;
 {
        struct mgs_device *mgs = exp2mgs_dev(exp);
         struct obd_ioctl_data *data = karg;
index 40132a4..e435f5d 100644 (file)
@@ -2555,7 +2555,7 @@ static int echo_client_brw_ioctl(const struct lu_env *env, int rw,
 
 static int
 echo_client_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 
 static int
 echo_client_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
-                      void *karg, void *uarg)
+                     void *karg, void __user *uarg)
 {
 #ifdef HAVE_SERVER_SUPPORT
        struct tgt_session_info *tsi;
 {
 #ifdef HAVE_SERVER_SUPPORT
        struct tgt_session_info *tsi;
index a1ee602..1be25b5 100644 (file)
@@ -1284,7 +1284,7 @@ out:
  * \retval             negative value on error
  */
 static int ofd_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
  * \retval             negative value on error
  */
 static int ofd_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
-                        void *karg, void *uarg)
+                        void *karg, void __user *uarg)
 {
        struct lu_env            env;
        struct ofd_device       *ofd = ofd_exp(exp);
 {
        struct lu_env            env;
        struct ofd_device       *ofd = ofd_exp(exp);
index 2ab31b4..72871ae 100644 (file)
@@ -2265,7 +2265,7 @@ static int osc_statfs(const struct lu_env *env, struct obd_export *exp,
 }
 
 static int osc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 }
 
 static int osc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
-                         void *karg, void *uarg)
+                        void *karg, void __user *uarg)
 {
         struct obd_device *obd = exp->exp_obd;
         struct obd_ioctl_data *data = karg;
 {
         struct obd_device *obd = exp->exp_obd;
         struct obd_ioctl_data *data = karg;
index 06d6e4d..0cd88ec 100644 (file)
@@ -1654,7 +1654,7 @@ static int osp_import_event(struct obd_device *obd, struct obd_import *imp,
  * \retval negative    negative errno if the ioctl handling failed.
  */
 static int osp_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
  * \retval negative    negative errno if the ioctl handling failed.
  */
 static int osp_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
-                        void *karg, void *uarg)
+                        void *karg, void __user *uarg)
 {
        struct obd_device       *obd = exp->exp_obd;
        struct osp_device       *d;
 {
        struct obd_device       *obd = exp->exp_obd;
        struct osp_device       *d;