Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+6 -3
+3 -1
drivers/usb/core/devio.c
··· 530 530 INIT_LIST_HEAD(&ps->async_completed); 531 531 init_waitqueue_head(&ps->wait); 532 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 536 ps->disccontext = NULL; 535 537 ps->ifclaimed = 0; 536 538 wmb();
+1 -1
drivers/usb/core/inode.c
··· 713 713 sinfo.si_errno = EPIPE; 714 714 sinfo.si_code = SI_ASYNCIO; 715 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 719 usbfs_update_special();
+2 -1
drivers/usb/core/usb.h
··· 52 52 struct list_head async_completed; 53 53 wait_queue_head_t wait; /* wake up if a request completed */ 54 54 unsigned int discsignr; 55 - struct task_struct *disctask; 55 + pid_t disc_pid; 56 + uid_t disc_uid, disc_euid; 56 57 void __user *disccontext; 57 58 unsigned long ifclaimed; 58 59 };