Commit da602a16 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] fix a copy_user return

parent ef1c3837
...@@ -536,7 +536,8 @@ static ssize_t read_profile(struct file *file, char *buf, ...@@ -536,7 +536,8 @@ static ssize_t read_profile(struct file *file, char *buf,
buf++; p++; count--; read++; buf++; p++; count--; read++;
} }
pnt = (char *)prof_buffer + p - sizeof(unsigned int); pnt = (char *)prof_buffer + p - sizeof(unsigned int);
copy_to_user(buf,(void *)pnt,count); if(copy_to_user(buf,(void *)pnt,count))
return -EFAULT;
read += count; read += count;
*ppos += read; *ppos += read;
return read; return read;
......
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