From 4c9ec219766a217468fb94a281c416455a884dda Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Sun, 5 Mar 2017 22:41:10 -0800 Subject: 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 --- fs/pstore/pmsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/pstore/pmsg.c') 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; } -- cgit v1.2.3