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

Commit 5b0ed526 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Linus Torvalds
Browse files

x86: fix ktermios-termio conversion



The legacy TCSETA{,W,F} ioctls failed to set the termio->c_line field
on x86. This adds a missing get_user.

The same ioctls also fail to report faulting user pointers, which
we keep ignoring.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 70fd8fde
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ static inline int user_termio_to_kernel_termios(struct ktermios *termios,
	SET_LOW_TERMIOS_BITS(termios, termio, c_oflag);
	SET_LOW_TERMIOS_BITS(termios, termio, c_cflag);
	SET_LOW_TERMIOS_BITS(termios, termio, c_lflag);
	get_user(termios->c_line, &termio->c_line);
	return copy_from_user(termios->c_cc, termio->c_cc, NCC);
}