Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1517124
| From | Johan Hovold <johan@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/3] tty: amiserial: fix invalid user-pointer check |
| Date | 2016-11-08 13:30 +0100 |
| Message-ID | <sBdHk-SQ-7@gated-at.bofh.it> (permalink) |
| References | <sBdHj-SQ-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
drivers/tty/amiserial.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 208f573495dc..dfbb974927f2 100644
--- 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;
--
2.7.3
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 1/3] tty: amiserial: fix invalid user-pointer check Johan Hovold <johan@kernel.org> - 2016-11-08 13:30 +0100
csiph-web