Commit 8e231e72 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] compat_fillonedir() warning fix

	access_ok() expects a pointer, not unsigned long.  It's not a
problem on platforms that have this guy done as a macro (or ones that
do not use fs/compat.c at all), but that's still wrong and on some
platforms that care we actually have access_ok() as inlined function.
Bogus cast removed.
parent e4d478f7
...@@ -824,7 +824,7 @@ static int compat_fillonedir(void *__buf, const char *name, int namlen, ...@@ -824,7 +824,7 @@ static int compat_fillonedir(void *__buf, const char *name, int namlen,
return -EINVAL; return -EINVAL;
buf->result++; buf->result++;
dirent = buf->dirent; dirent = buf->dirent;
if (!access_ok(VERIFY_WRITE, (unsigned long)dirent, if (!access_ok(VERIFY_WRITE, dirent,
(unsigned long)(dirent->d_name + namlen + 1) - (unsigned long)(dirent->d_name + namlen + 1) -
(unsigned long)dirent)) (unsigned long)dirent))
goto efault; goto 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