ChangeSet 1.1119.3.5, 2003/09/05 15:47:03-07:00, greg@kroah.com [PATCH] USB: fix copy_from_user call in acm.c drivers/usb/acm.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff -Nru a/drivers/usb/acm.c b/drivers/usb/acm.c --- a/drivers/usb/acm.c Fri Sep 5 17:10:51 2003 +++ b/drivers/usb/acm.c Fri Sep 5 17:10:51 2003 @@ -363,9 +363,10 @@ count = (count > acm->writesize) ? acm->writesize : count; - if (from_user) - copy_from_user(acm->writeurb.transfer_buffer, buf, count); - else + if (from_user) { + if (copy_from_user(acm->writeurb.transfer_buffer, buf, count)) + return -EFAULT; + } else memcpy(acm->writeurb.transfer_buffer, buf, count); acm->writeurb.transfer_buffer_length = count;