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/arm/kernel/atags_proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/kernel/atags_proc.c b/arch/arm/kernel/atags_proc.c index 8411fbfbcb8b..ff28bf24dd30 100644 --- a/arch/arm/kernel/atags_proc.c +++ b/arch/arm/kernel/atags_proc.c @@ -10,15 +10,15 @@ struct buffer { char data[] __counted_by(size); }; -static ssize_t atags_read(struct file *file, char __user *buf, +static ssize_t atags_read(struct file *file, char *buf, size_t count, loff_t *ppos) { struct buffer *b = pde_data(file_inode(file)); - return simple_read_from_buffer(buf, count, ppos, b->data, b->size); + return memory_read_from_buffer(buf, count, ppos, b->data, b->size); } static const struct proc_ops atags_proc_ops = { - .proc_read = atags_read, + .proc_read_buf = atags_read, .proc_lseek = default_llseek, }; -- 2.53.0
