My previous patch (several months ago) missed one instance of
changing usblp status data from local stack to alloc-ed memory.

This patch to 2.5.70-bk13 (but should still apply AFAIK)
corrects the missing instance.  Please apply.

--
~Randy


--- ./drivers/usb/class/usblp.c.orig    2003-06-10 20:31:48.000000000 -0700
+++ ./drivers/usb/class/usblp.c 2003-06-12 00:02:28.000000000 -0700
@@ -426,7 +426,7 @@ static int usblp_ioctl(struct inode *ino
 {
        struct usblp *usblp = file->private_data;
        int length, err, i;
-       unsigned char lpstatus, newChannel;
+       unsigned char newChannel;
        int status;
        int twoints[2];
        int retval = 0;
@@ -578,12 +578,12 @@ static int usblp_ioctl(struct inode *ino
                switch (cmd) {
 
                        case LPGETSTATUS:
-                               if (usblp_read_status(usblp, &lpstatus)) {
+                               if (usblp_read_status(usblp, usblp->statusbuf)) {
                                        err("usblp%d: failed reading printer status", 
usblp->minor);
                                        retval = -EIO;
                                        goto done;
                                }
-                               status = lpstatus;
+                               status = *usblp->statusbuf;
                                if (copy_to_user ((int *)arg, &status, sizeof(int)))
                                        retval = -EFAULT;
                                break;


-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to