From 9175d6f862039cfbf6b85333d72a9d91e64ea42a Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Thu, 4 Feb 2016 09:21:22 -0500 Subject: [PATCH 1/1] LU-7623 Update obd iocontrol methods with __user attribute 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 Reviewed-on: http://review.whamcloud.com/17781 Tested-by: Jenkins Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Dmitry Eremin --- lustre/lmv/lmv_obd.c | 2 +- lustre/mdt/mdt_handler.c | 4 ++-- lustre/mgs/mgs_handler.c | 2 +- lustre/obdecho/echo_client.c | 2 +- lustre/ofd/ofd_obd.c | 2 +- lustre/osc/osc_request.c | 2 +- lustre/osp/osp_dev.c | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index 3cde2fd..e6d6511 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -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, - 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; diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 3035202..9ffd9c7 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -1574,7 +1574,7 @@ out_shrink: } 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) { @@ -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, - void *karg, void *uarg) + void *karg, void __user *uarg) { struct lu_env env; struct obd_device *obd = exp->exp_obd; diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c index 316d963..f1a643e 100644 --- a/lustre/mgs/mgs_handler.c +++ b/lustre/mgs/mgs_handler.c @@ -863,7 +863,7 @@ out_pool: /* 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; diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c index 40132a4..e435f5d 100644 --- a/lustre/obdecho/echo_client.c +++ b/lustre/obdecho/echo_client.c @@ -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, - void *karg, void *uarg) + void *karg, void __user *uarg) { #ifdef HAVE_SERVER_SUPPORT struct tgt_session_info *tsi; diff --git a/lustre/ofd/ofd_obd.c b/lustre/ofd/ofd_obd.c index a1ee602..1be25b5 100644 --- a/lustre/ofd/ofd_obd.c +++ b/lustre/ofd/ofd_obd.c @@ -1284,7 +1284,7 @@ out: * \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); diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 2ab31b4..72871ae 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -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, - void *karg, void *uarg) + void *karg, void __user *uarg) { struct obd_device *obd = exp->exp_obd; struct obd_ioctl_data *data = karg; diff --git a/lustre/osp/osp_dev.c b/lustre/osp/osp_dev.c index 06d6e4d..0cd88ec 100644 --- a/lustre/osp/osp_dev.c +++ b/lustre/osp/osp_dev.c @@ -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, - void *karg, void *uarg) + void *karg, void __user *uarg) { struct obd_device *obd = exp->exp_obd; struct osp_device *d; -- 1.8.3.1