summaryrefslogtreecommitdiff
path: root/fs/pstore/pmsg.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-03-06 09:41:10 +0300
committerKees Cook <keescook@chromium.org>2017-03-08 01:01:02 +0300
commit4c9ec219766a217468fb94a281c416455a884dda (patch)
tree9a005a21de1dc1ff39e8033d303149dbebd92705 /fs/pstore/pmsg.c
parentfdd0311863b32b42bb2c54e60c987bbbabc0c430 (diff)
downloadlinux-4c9ec219766a217468fb94a281c416455a884dda.tar.xz
pstore: Remove write_buf() callback
Now that write() and write_buf() are functionally identical, this removes write_buf(), and renames write_buf_user() to write_user(). Additionally adds sanity-checks for pstore_info's declared functions and flags at registration time. Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/pstore/pmsg.c')
-rw-r--r--fs/pstore/pmsg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/pstore/pmsg.c b/fs/pstore/pmsg.c
index ce35907602de..c16a2477e106 100644
--- a/fs/pstore/pmsg.c
+++ b/fs/pstore/pmsg.c
@@ -33,12 +33,12 @@ static ssize_t write_pmsg(struct file *file, const char __user *buf,
if (!count)
return 0;
- /* check outside lock, page in any data. write_buf_user also checks */
+ /* check outside lock, page in any data. write_user also checks */
if (!access_ok(VERIFY_READ, buf, count))
return -EFAULT;
mutex_lock(&pmsg_lock);
- ret = psinfo->write_buf_user(&record, buf);
+ ret = psinfo->write_user(&record, buf);
mutex_unlock(&pmsg_lock);
return ret ? ret : count;
}