From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org
Cc: tv@beamnet.de, alan@lxorguk.ukuu.org.uk, greg@kroah.com
Subject: + usb-serial-fix-oti6858c-segfault-in-termios-handling.patch added to -mm tree
Date: Thu, 26 Jul 2007 21:47:56 -0700 [thread overview]
Message-ID: <200707270447.l6R4luaC005951@imap1.linux-foundation.org> (raw)
The patch titled
usb-serial: fix oti6858.c segfault in termios handling
has been added to the -mm tree. Its filename is
usb-serial-fix-oti6858c-segfault-in-termios-handling.patch
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
------------------------------------------------------
Subject: usb-serial: fix oti6858.c segfault in termios handling
From: Thomas Viehmann <tv@beamnet.de>
The oti6858 usb serial driver should use kernel_termios_to_user_termios/
user_termios_to_kernel_termios to avoid segfaults because the kernel uses a
structure differing from that of user space with a different size.
Signed-off-by: Thomas Viehmann <tv@beamnet.de>
Cc: Greg KH <greg@kroah.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/usb/serial/oti6858.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff -puN drivers/usb/serial/oti6858.c~usb-serial-fix-oti6858c-segfault-in-termios-handling drivers/usb/serial/oti6858.c
--- a/drivers/usb/serial/oti6858.c~usb-serial-fix-oti6858c-segfault-in-termios-handling
+++ a/drivers/usb/serial/oti6858.c
@@ -818,19 +818,18 @@ static int oti6858_ioctl(struct usb_seri
switch (cmd) {
case TCGETS:
- if (copy_to_user(user_arg, port->tty->termios,
- sizeof(struct ktermios))) {
+ if (kernel_termios_to_user_termios(
+ (struct ktermios __user *)arg,
+ port->tty->termios))
return -EFAULT;
- }
return 0;
case TCSETS:
case TCSETSW: /* FIXME: this is not the same! */
case TCSETSF: /* FIXME: this is not the same! */
- if (copy_from_user(port->tty->termios, user_arg,
- sizeof(struct ktermios))) {
+ if (user_termios_to_kernel_termios(port->tty->termios,
+ (struct ktermios __user *)arg))
return -EFAULT;
- }
oti6858_set_termios(port, NULL);
return 0;
_
Patches currently in -mm which might be from tv@beamnet.de are
usb-serial-fix-oti6858c-segfault-in-termios-handling.patch
reply other threads:[~2007-07-27 4:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200707270447.l6R4luaC005951@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=tv@beamnet.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.