projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c31ef9
)
tty: amiserial: fix invalid user-pointer check
author
Johan Hovold
<johan@kernel.org>
Tue, 8 Nov 2016 12:24:53 +0000
(13:24 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 10 Nov 2016 13:41:25 +0000
(14:41 +0100)
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>
drivers/tty/amiserial.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/tty/amiserial.c
b/drivers/tty/amiserial.c
index 208f573495dcab3efdad85fcbdcd32809102c192..dfbb974927f289095cccedb06d0d3db73dbfbdee 100644
(file)
--- a/
drivers/tty/amiserial.c
+++ b/
drivers/tty/amiserial.c
@@
-1012,8
+1012,6
@@
static int get_serial_info(struct tty_struct *tty, struct serial_state *state,
{
struct serial_struct tmp;
- if (!retinfo)
- return -EFAULT;
memset(&tmp, 0, sizeof(tmp));
tty_lock(tty);
tmp.line = tty->index;