Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21cb2559 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Al Viro
Browse files

mconsole: switch to kernel_read



Instead of playing with address limits.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 8e93157b
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -148,12 +148,7 @@ void mconsole_proc(struct mc_request *req)
	}

	do {
		loff_t pos = file->f_pos;
		mm_segment_t old_fs = get_fs();
		set_fs(KERNEL_DS);
		len = vfs_read(file, buf, PAGE_SIZE - 1, &pos);
		set_fs(old_fs);
		file->f_pos = pos;
		len = kernel_read(file, buf, PAGE_SIZE - 1, &file->f_pos);
		if (len < 0) {
			mconsole_reply(req, "Read of file failed", 1, 0);
			goto out_free;