Whamcloud - gitweb
LU-16634 misc: standardize iocontrol param handling 14/50314/10
authorAndreas Dilger <adilger@whamcloud.com>
Mon, 20 Mar 2023 02:22:10 +0000 (20:22 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 1 May 2023 04:07:25 +0000 (04:07 +0000)
commit5eae8514f5f1730fe93d55d348400f5ecf681078
tree4dc285f694e2d49215efbe2a63397a241aa33d0f
parent0ab322a7f3a434997051912cec6c77253af5f351
LU-16634 misc: standardize iocontrol param handling

Validate uarg and karg early in iocontrol processing where needed.
This needs kernel interop for 4.20+ kernels for access_ok(), but
this can be checked by #ifdef and does not need an autoconf test.

Fix incorrect definition of OBD_IOC_BARRIER to match reality.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reported-by: Tao Lyu <tao.lyu@epfl.ch>
Change-Id: I1a0d2f839949debf346aa15c65b0f407e9ce7057
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50314
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Vitaliy Kuznetsov <vkuznetsov@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 files changed:
libcfs/libcfs/crypto/policy.c
lustre/include/lustre_compat.h
lustre/include/uapi/linux/lustre/lustre_ioctl.h
lustre/ldlm/ldlm_lib.c
lustre/llite/file.c
lustre/llite/llite_lib.c
lustre/lmv/lmv_obd.c
lustre/lod/lod_dev.c
lustre/lov/lov_obd.c
lustre/mdc/mdc_request.c
lustre/mdd/mdd_device.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mgs/mgs_handler.c
lustre/obdclass/class_obd.c
lustre/obdecho/echo_client.c
lustre/ofd/ofd_obd.c
lustre/osc/osc_request.c
lustre/osp/osp_dev.c
lustre/tests/group_lock_test.c