提交 68832b20 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

serial: crisv10: 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.

Cc: Mikael Starvik <starvik@axis.com>
Cc: linux-cris-kernel@axis.com
Signed-off-by: NJohan Hovold <johan@kernel.org>
Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 7a3f0984
...@@ -3213,8 +3213,6 @@ get_serial_info(struct e100_serial * info, ...@@ -3213,8 +3213,6 @@ get_serial_info(struct e100_serial * info,
* should set them to something else than 0. * should set them to something else than 0.
*/ */
if (!retinfo)
return -EFAULT;
memset(&tmp, 0, sizeof(tmp)); memset(&tmp, 0, sizeof(tmp));
tmp.type = info->type; tmp.type = info->type;
tmp.line = info->line; tmp.line = info->line;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册