diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-10 19:31:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-10 19:31:30 -0400 |
commit | d7dd8a72ab8d305fbe1c4bb571e0633eba3a8d23 (patch) | |
tree | b1df87ccb102bbe4c2402a677d62bc6a0b85282e /drivers | |
parent | 46113830a18847cff8da73005e57bc49c2f95a56 (diff) |
Use the new "kill_proc_info_as_uid()" for USB disconnect too
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/core/devio.c | 4 | ||||
-rw-r--r-- | drivers/usb/core/inode.c | 2 | ||||
-rw-r--r-- | drivers/usb/core/usb.h | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 6c35dcbea664..487ff672b104 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -530,7 +530,9 @@ static int usbdev_open(struct inode *inode, struct file *file) | |||
530 | INIT_LIST_HEAD(&ps->async_completed); | 530 | INIT_LIST_HEAD(&ps->async_completed); |
531 | init_waitqueue_head(&ps->wait); | 531 | init_waitqueue_head(&ps->wait); |
532 | ps->discsignr = 0; | 532 | ps->discsignr = 0; |
533 | ps->disctask = current; | 533 | ps->disc_pid = current->pid; |
534 | ps->disc_uid = current->uid; | ||
535 | ps->disc_euid = current->euid; | ||
534 | ps->disccontext = NULL; | 536 | ps->disccontext = NULL; |
535 | ps->ifclaimed = 0; | 537 | ps->ifclaimed = 0; |
536 | wmb(); | 538 | wmb(); |
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c index 640f41e47029..d07bba01995b 100644 --- a/drivers/usb/core/inode.c +++ b/drivers/usb/core/inode.c | |||
@@ -713,7 +713,7 @@ void usbfs_remove_device(struct usb_device *dev) | |||
713 | sinfo.si_errno = EPIPE; | 713 | sinfo.si_errno = EPIPE; |
714 | sinfo.si_code = SI_ASYNCIO; | 714 | sinfo.si_code = SI_ASYNCIO; |
715 | sinfo.si_addr = ds->disccontext; | 715 | sinfo.si_addr = ds->disccontext; |
716 | send_sig_info(ds->discsignr, &sinfo, ds->disctask); | 716 | kill_proc_info_as_uid(ds->discsignr, &sinfo, ds->disc_pid, ds->disc_uid, ds->disc_euid); |
717 | } | 717 | } |
718 | } | 718 | } |
719 | usbfs_update_special(); | 719 | usbfs_update_special(); |
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 83d48c8133af..e6504f3370ad 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h | |||
@@ -52,7 +52,8 @@ struct dev_state { | |||
52 | struct list_head async_completed; | 52 | struct list_head async_completed; |
53 | wait_queue_head_t wait; /* wake up if a request completed */ | 53 | wait_queue_head_t wait; /* wake up if a request completed */ |
54 | unsigned int discsignr; | 54 | unsigned int discsignr; |
55 | struct task_struct *disctask; | 55 | pid_t disc_pid; |
56 | uid_t disc_uid, disc_euid; | ||
56 | void __user *disccontext; | 57 | void __user *disccontext; |
57 | unsigned long ifclaimed; | 58 | unsigned long ifclaimed; |
58 | }; | 59 | }; |