Skip to contentSkip to conversation

Simple cyberjack diff

PATCH Shane Nay 2 participants 2 messages Feb 26, 2002 – Feb 27, 2002

Subsystems (2)
lore
Share & tools
lore

Shane Nay

author
#0 lore raw

While looking around the usb code I noticed this semaphore problem in cyberjack. Anyway, it's a quicky.

Thanks,
Shane Nay.

drivers/usb/serial/cyberjack.c Tue Feb 26 14:09:31 2002 renamed from linux/drivers/usb/serial/cyberjack.c Fri Dec 21 09:41:55 2001 +3 -2
@@ -238,7 +238,8 @@
        if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ) {
                /* To much data  for buffer. Reset buffer. */
                priv->wrfilled=0;
-               return (0);
+               count=0;
+               goto exit;
        }
 
        /* Copy data */
@@ -299,7 +300,7 @@
                        priv->wrsent=0;
                }
        }
-
+exit:
        up (&port->sem);
        return (count);
 } 
#1 lore raw
Quoted 2 lines · Shane Nay

While looking around the usb code I noticed this semaphore problem in cyberjack. Anyway, it's a quicky.

Good catch. I'll add it to my 2.4 and 2.5 trees and push the changes onward.

The same problem is also in the copy_from_user() test a few lines below this one. I'll fix it.

thanks again,

greg k-h