Commit ef7562b7 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

dpt_i2o: Fix up copy*user

Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0a53f169
......@@ -1918,6 +1918,10 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg)
}
size = size>>16;
size *= 4;
if (size > MAX_MESSAGE_SIZE) {
rcode = EINVAL;
goto cleanup;
}
/* Copy in the user's I2O command */
if (copy_from_user (msg, user_msg, size)) {
rcode = -EFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment