Commit 01019ab6 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman

dpt_i2o: Fix up copy*user

commit ef7562b7 upstream.
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4d4c684c
......@@ -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