Commit d618d88d authored by Linus Torvalds's avatar Linus Torvalds Committed by Linus Torvalds

Fix up getdents64() user pointer checking from -mm merge

parent c384a968
......@@ -229,7 +229,7 @@ static int filldir64(void * __buf, const char * name, int namlen, loff_t offset,
goto efault;
if (copy_to_user(dirent->d_name, name, namlen))
goto efault;
if (put_user(0, dirent->d_name + namlen))
if (__put_user(0, dirent->d_name + namlen))
goto efault;
((char *) dirent) += reclen;
buf->current_dir = dirent;
......@@ -247,7 +247,7 @@ asmlinkage long sys_getdents64(unsigned int fd, void * dirent, unsigned int coun
int error;
error = -EFAULT;
if (!access_ok(VERIFY_WRITE, dirent, sizeof(struct linux_dirent64)))
if (!access_ok(VERIFY_WRITE, dirent, count))
goto out;
error = -EBADF;
......
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