aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-10-27 11:35:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-29 12:01:07 -0400
commitef7562b7f28319e6dd1f85dc1af87df2a7a84832 (patch)
tree6aa1059426764b68f8698e24ccd7c9946d00fb5d /drivers
parent0a53f1693cb956ebd8ba0a9acca6adb2dcb99d5f (diff)
dpt_i2o: Fix up copy*user
Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/dpt_i2o.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index b6af63ca980b..7d1aac31ec8d 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -1918,6 +1918,10 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg)
1918 } 1918 }
1919 size = size>>16; 1919 size = size>>16;
1920 size *= 4; 1920 size *= 4;
1921 if (size > MAX_MESSAGE_SIZE) {
1922 rcode = EINVAL;
1923 goto cleanup;
1924 }
1921 /* Copy in the user's I2O command */ 1925 /* Copy in the user's I2O command */
1922 if (copy_from_user (msg, user_msg, size)) { 1926 if (copy_from_user (msg, user_msg, size)) {
1923 rcode = -EFAULT; 1927 rcode = -EFAULT;