Implement ->proc_read_buf() so procfs copies what is read to userspace after it unpinned the entry.
Signed-off-by: Christian Brauner (Amutable) <[email protected]> --- arch/m68k/kernel/bootinfo_proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/m68k/kernel/bootinfo_proc.c b/arch/m68k/kernel/bootinfo_proc.c index 857fa2aaa748..4936cf44e86a 100644 --- a/arch/m68k/kernel/bootinfo_proc.c +++ b/arch/m68k/kernel/bootinfo_proc.c @@ -19,15 +19,15 @@ static char bootinfo_tmp[1536] __initdata; static void *bootinfo_copy; static size_t bootinfo_size; -static ssize_t bootinfo_read(struct file *file, char __user *buf, +static ssize_t bootinfo_read(struct file *file, char *buf, size_t count, loff_t *ppos) { - return simple_read_from_buffer(buf, count, ppos, bootinfo_copy, + return memory_read_from_buffer(buf, count, ppos, bootinfo_copy, bootinfo_size); } static const struct proc_ops bootinfo_proc_ops = { - .proc_read = bootinfo_read, + .proc_read_buf = bootinfo_read, .proc_lseek = default_llseek, }; -- 2.53.0
