提交 ef7562b7 编写于 作者: A Alan Cox 提交者: Linus Torvalds

dpt_i2o: Fix up copy*user

Signed-off-by: NAlan Cox <alan@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0a53f169
...@@ -1918,6 +1918,10 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg) ...@@ -1918,6 +1918,10 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg)
} }
size = size>>16; size = size>>16;
size *= 4; size *= 4;
if (size > MAX_MESSAGE_SIZE) {
rcode = EINVAL;
goto cleanup;
}
/* Copy in the user's I2O command */ /* Copy in the user's I2O command */
if (copy_from_user (msg, user_msg, size)) { if (copy_from_user (msg, user_msg, size)) {
rcode = -EFAULT; rcode = -EFAULT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册