diff options
author | Liang Zhen <liang.zhen@intel.com> | 2016-03-22 23:03:48 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-28 14:30:36 (GMT) |
commit | ae664e824e3e4a85dbe857815d269f209d998e36 (patch) | |
tree | e1317719becad3659dfcca293bf1a86071fc5800 /drivers/staging/lustre/lnet/libcfs | |
parent | 7e221b6088eda47589480bcb29f4aaba44da49c7 (diff) | |
download | linux-ae664e824e3e4a85dbe857815d269f209d998e36.tar.xz |
staging: lustre: libcfs: replace LNET_MAX_IOCTL_BUF_LEN with something bigger
The size of LNET_MAX_IOCTL_BUF_LEN restricts the size of
libcfs ioctl to the maximum needs of the LNet layer. Since
libcfs also handles things like debugging we might need
to let user land pass more data to or from the kernel than
what is possible
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/libcfs')
-rw-r--r-- | drivers/staging/lustre/lnet/libcfs/module.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lnet/libcfs/module.c b/drivers/staging/lustre/lnet/libcfs/module.c index cdc640b..f9f9d59 100644 --- a/drivers/staging/lustre/lnet/libcfs/module.c +++ b/drivers/staging/lustre/lnet/libcfs/module.c @@ -54,9 +54,6 @@ # define DEBUG_SUBSYSTEM S_LNET -#define LNET_MAX_IOCTL_BUF_LEN (sizeof(struct lnet_ioctl_net_config) + \ - sizeof(struct lnet_ioctl_config_data)) - #include "../../include/linux/libcfs/libcfs.h" #include <asm/div64.h> @@ -186,7 +183,7 @@ static int libcfs_ioctl(struct cfs_psdev_file *pfile, unsigned long cmd, * do a check here to restrict the size of the memory * to allocate to guard against DoS attacks. */ - if (buf_len > LNET_MAX_IOCTL_BUF_LEN) { + if (buf_len > LIBCFS_IOC_DATA_MAX) { CERROR("LNET: user buffer exceeds kernel buffer\n"); return -EINVAL; } |