staging: lustre: lnet: make sure lnet data not greater than LIBCFS_IOC_DATA_MAX
Fail to compile if largest LNet user land data structures passed to kernel are larger than LIBCFS_IOC_DATA_MAX 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>
This commit is contained in:
parent
ed2f549dc0
commit
da4e589837
@ -1864,6 +1864,10 @@ LNetCtl(unsigned int cmd, void *arg)
|
||||
int rc;
|
||||
unsigned long secs_passed;
|
||||
|
||||
BUILD_BUG_ON(LIBCFS_IOC_DATA_MAX <
|
||||
sizeof(struct lnet_ioctl_net_config) +
|
||||
sizeof(struct lnet_ioctl_config_data));
|
||||
|
||||
switch (cmd) {
|
||||
case IOC_LIBCFS_GET_NI:
|
||||
rc = LNetGetId(data->ioc_count, &id);
|
||||
|
Loading…
Reference in New Issue
Block a user