mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
tty: amiserial: fix invalid user-pointer check
Drop invalid user-pointer check from TIOCGSERIAL handler. A NULL-pointer can be valid in user space and copy_to_user() takes care of sanity checking. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5c31ef91c0
commit
6f8ada1292
1 changed files with 0 additions and 2 deletions
|
@ -1012,8 +1012,6 @@ static int get_serial_info(struct tty_struct *tty, struct serial_state *state,
|
||||||
{
|
{
|
||||||
struct serial_struct tmp;
|
struct serial_struct tmp;
|
||||||
|
|
||||||
if (!retinfo)
|
|
||||||
return -EFAULT;
|
|
||||||
memset(&tmp, 0, sizeof(tmp));
|
memset(&tmp, 0, sizeof(tmp));
|
||||||
tty_lock(tty);
|
tty_lock(tty);
|
||||||
tmp.line = tty->index;
|
tmp.line = tty->index;
|
||||||
|
|
Loading…
Reference in a new issue