Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Subject | Re: [PATCH] More USB fixes for 2.5.67 | From | Greg KH <> | Date | Wed, 16 Apr 2003 23:05:04 -0700 |
| |
ChangeSet 1.1060, 2003/04/14 10:22:36-07:00, greg@kroah.com
[PATCH] USB: kobil_sct fix up errors found by smatch
diff -Nru a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c --- a/drivers/usb/serial/kobil_sct.c Wed Apr 16 10:49:08 2003 +++ b/drivers/usb/serial/kobil_sct.c Wed Apr 16 10:49:08 2003 @@ -514,7 +514,9 @@ dbg("%s - port %d Error in verify_area", __FUNCTION__, port->number); return(result); } - kernel_termios_to_user_termios((struct termios *)arg, &priv->internal_termios); + if (kernel_termios_to_user_termios((struct termios *)arg, + &priv->internal_termios)) + return -EFAULT; return 0; case TCSETS: // 0x5402 @@ -527,7 +529,9 @@ dbg("%s - port %d Error in verify_area", __FUNCTION__, port->number); return result; } - user_termios_to_kernel_termios( &priv->internal_termios, (struct termios *)arg); + if (user_termios_to_kernel_termios(&priv->internal_termios, + (struct termios *)arg)) + return -EFAULT; settings = (unsigned char *) kmalloc(50, GFP_KERNEL); if (! settings) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |