Commit 63a0acfe authored by Andries E. Brouwer's avatar Andries E. Brouwer Committed by Linus Torvalds

[PATCH] sparse fix kcore

parent 8ab184ad
...@@ -27,7 +27,7 @@ static int open_kcore(struct inode * inode, struct file * filp) ...@@ -27,7 +27,7 @@ static int open_kcore(struct inode * inode, struct file * filp)
return capable(CAP_SYS_RAWIO) ? 0 : -EPERM; return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
} }
static ssize_t read_kcore(struct file *, char *, size_t, loff_t *); static ssize_t read_kcore(struct file *, char __user *, size_t, loff_t *);
struct file_operations proc_kcore_operations = { struct file_operations proc_kcore_operations = {
.read = read_kcore, .read = read_kcore,
...@@ -267,7 +267,8 @@ static void elf_kcore_store_hdr(char *bufp, int nphdr, int dataoff) ...@@ -267,7 +267,8 @@ static void elf_kcore_store_hdr(char *bufp, int nphdr, int dataoff)
/* /*
* read from the ELF header and then kernel memory * read from the ELF header and then kernel memory
*/ */
static ssize_t read_kcore(struct file *file, char *buffer, size_t buflen, loff_t *fpos) static ssize_t
read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
{ {
ssize_t acc = 0; ssize_t acc = 0;
size_t size, tsz; size_t size, tsz;
......
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