aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/gdth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/gdth.c')
-rw-r--r--drivers/scsi/gdth.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index b860d650a563..4cf7ffa2dad3 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -4175,6 +4175,14 @@ static int ioc_general(void __user *arg, char *cmnd)
4175 ha = gdth_find_ha(gen.ionode); 4175 ha = gdth_find_ha(gen.ionode);
4176 if (!ha) 4176 if (!ha)
4177 return -EFAULT; 4177 return -EFAULT;
4178
4179 if (gen.data_len > INT_MAX)
4180 return -EINVAL;
4181 if (gen.sense_len > INT_MAX)
4182 return -EINVAL;
4183 if (gen.data_len + gen.sense_len > INT_MAX)
4184 return -EINVAL;
4185
4178 if (gen.data_len + gen.sense_len != 0) { 4186 if (gen.data_len + gen.sense_len != 0) {
4179 if (!(buf = gdth_ioctl_alloc(ha, gen.data_len + gen.sense_len, 4187 if (!(buf = gdth_ioctl_alloc(ha, gen.data_len + gen.sense_len,
4180 FALSE, &paddr))) 4188 FALSE, &paddr)))