aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/gdth.c
diff options
context:
space:
mode:
authorJeremy Erickson <jerickso@cs.unc.edu>2014-04-18 17:06:00 -0400
committerJeremy Erickson <jerickso@cs.unc.edu>2014-04-18 17:06:00 -0400
commita215aa7b9ab3759c047201199fba64d3042d7f13 (patch)
treebca37493d9b2233450e6d3ffced1261d0e4f71fe /drivers/scsi/gdth.c
parentd31199a77ef606f1d06894385f1852181ba6136b (diff)
Update 2.6.36 to 2.6.36.4wip-dissipation2-jerickso
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)))