Commit d42d159a authored by David Mosberger's avatar David Mosberger Committed by Tony Luck

[IA64] fix argument-order in access_ok() call from csum_partial_copy_from_user

Another sparse-detected bug.

Signed-off-by: davidm@hpl.hp.com
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 045fccfc
/*
* Network Checksum & Copy routine
*
* Copyright (C) 1999, 2003 Hewlett-Packard Co
* Copyright (C) 1999, 2003-2004 Hewlett-Packard Co
* Stephane Eranian <eranian@hpl.hp.com>
*
* Most of the code has been imported from Linux/Alpha
......@@ -129,10 +129,10 @@ do_csum_partial_copy_from_user (const char *src, char *dst, int len,
}
unsigned int
csum_partial_copy_from_user(const char *src, char *dst, int len,
unsigned int sum, int *errp)
csum_partial_copy_from_user (const char __user *src, char *dst, int len,
unsigned int sum, int *errp)
{
if (!access_ok(src, len, VERIFY_READ)) {
if (!access_ok(VERIFY_READ, src, len)) {
*errp = -EFAULT;
memset(dst, 0, len);
return sum;
......
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