]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Use the new "kill_proc_info_as_uid()" for USB disconnect too
authorLinus Torvalds <torvalds@g5.osdl.org>
Mon, 10 Oct 2005 23:31:30 +0000 (16:31 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 10 Oct 2005 23:31:30 +0000 (16:31 -0700)
All the same issues - we can't just save the pointer to the thread, we
must save the pid/uid/euid combination.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/usb/core/devio.c
drivers/usb/core/inode.c
drivers/usb/core/usb.h

index 6c35dcbea66444b6c37144276168c330cf40a865..487ff672b1045e4e750c7c17322b3a0a2a5eb9cf 100644 (file)
@@ -530,7 +530,9 @@ static int usbdev_open(struct inode *inode, struct file *file)
        INIT_LIST_HEAD(&ps->async_completed);
        init_waitqueue_head(&ps->wait);
        ps->discsignr = 0;
-       ps->disctask = current;
+       ps->disc_pid = current->pid;
+       ps->disc_uid = current->uid;
+       ps->disc_euid = current->euid;
        ps->disccontext = NULL;
        ps->ifclaimed = 0;
        wmb();
index 640f41e470294d5911f04a2d7e4c92df4d225455..d07bba01995b814367abb3f2fd7a6cfae6f7ccd7 100644 (file)
@@ -713,7 +713,7 @@ void usbfs_remove_device(struct usb_device *dev)
                        sinfo.si_errno = EPIPE;
                        sinfo.si_code = SI_ASYNCIO;
                        sinfo.si_addr = ds->disccontext;
-                       send_sig_info(ds->discsignr, &sinfo, ds->disctask);
+                       kill_proc_info_as_uid(ds->discsignr, &sinfo, ds->disc_pid, ds->disc_uid, ds->disc_euid);
                }
        }
        usbfs_update_special();
index 83d48c8133af5992913bfd33a8b94fd7a079423c..e6504f3370ad072952a1ca5fb3c85d2dfb192b10 100644 (file)
@@ -52,7 +52,8 @@ struct dev_state {
        struct list_head async_completed;
        wait_queue_head_t wait;     /* wake up if a request completed */
        unsigned int discsignr;
-       struct task_struct *disctask;
+       pid_t disc_pid;
+       uid_t disc_uid, disc_euid;
        void __user *disccontext;
        unsigned long ifclaimed;
 };