diff options
Diffstat (limited to 'drivers/vhost')
-rw-r--r-- | drivers/vhost/tcm_vhost.c | 4 | ||||
-rw-r--r-- | drivers/vhost/tcm_vhost.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c index 74b2edaaf1f6..ed8e2e6c8df2 100644 --- a/drivers/vhost/tcm_vhost.c +++ b/drivers/vhost/tcm_vhost.c | |||
@@ -995,11 +995,15 @@ static long vhost_scsi_ioctl(struct file *f, unsigned int ioctl, | |||
995 | case VHOST_SCSI_SET_ENDPOINT: | 995 | case VHOST_SCSI_SET_ENDPOINT: |
996 | if (copy_from_user(&backend, argp, sizeof backend)) | 996 | if (copy_from_user(&backend, argp, sizeof backend)) |
997 | return -EFAULT; | 997 | return -EFAULT; |
998 | if (backend.reserved != 0) | ||
999 | return -EOPNOTSUPP; | ||
998 | 1000 | ||
999 | return vhost_scsi_set_endpoint(vs, &backend); | 1001 | return vhost_scsi_set_endpoint(vs, &backend); |
1000 | case VHOST_SCSI_CLEAR_ENDPOINT: | 1002 | case VHOST_SCSI_CLEAR_ENDPOINT: |
1001 | if (copy_from_user(&backend, argp, sizeof backend)) | 1003 | if (copy_from_user(&backend, argp, sizeof backend)) |
1002 | return -EFAULT; | 1004 | return -EFAULT; |
1005 | if (backend.reserved != 0) | ||
1006 | return -EOPNOTSUPP; | ||
1003 | 1007 | ||
1004 | return vhost_scsi_clear_endpoint(vs, &backend); | 1008 | return vhost_scsi_clear_endpoint(vs, &backend); |
1005 | case VHOST_SCSI_GET_ABI_VERSION: | 1009 | case VHOST_SCSI_GET_ABI_VERSION: |
diff --git a/drivers/vhost/tcm_vhost.h b/drivers/vhost/tcm_vhost.h index e9d5c020fb39..d9e93557d669 100644 --- a/drivers/vhost/tcm_vhost.h +++ b/drivers/vhost/tcm_vhost.h | |||
@@ -93,6 +93,7 @@ struct vhost_scsi_target { | |||
93 | int abi_version; | 93 | int abi_version; |
94 | char vhost_wwpn[TRANSPORT_IQN_LEN]; | 94 | char vhost_wwpn[TRANSPORT_IQN_LEN]; |
95 | unsigned short vhost_tpgt; | 95 | unsigned short vhost_tpgt; |
96 | unsigned short reserved; | ||
96 | }; | 97 | }; |
97 | 98 | ||
98 | /* VHOST_SCSI specific defines */ | 99 | /* VHOST_SCSI specific defines */ |