aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2005-10-10 13:44:29 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-10 19:16:33 -0400
commit46113830a18847cff8da73005e57bc49c2f95a56 (patch)
tree93946fc290d9481e7055217ff497583647d1e4d4 /include/linux
parent094804c5a132f04c12dd4902ee15c64362e5c1af (diff)
[PATCH] Fix signal sending in usbdevio on async URB completion
If a process issues an URB from userspace and (starts to) terminate before the URB comes back, we run into the issue described above. This is because the urb saves a pointer to "current" when it is posted to the device, but there's no guarantee that this pointer is still valid afterwards. In fact, there are three separate issues: 1) the pointer to "current" can become invalid, since the task could be completely gone when the URB completion comes back from the device. 2) Even if the saved task pointer is still pointing to a valid task_struct, task_struct->sighand could have gone meanwhile. 3) Even if the process is perfectly fine, permissions may have changed, and we can no longer send it a signal. So what we do instead, is to save the PID and uid's of the process, and introduce a new kill_proc_info_as_uid() function. Signed-off-by: Harald Welte <laforge@gnumonks.org> [ Fixed up types and added symbol exports ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c3ba31f210a..27519df0f98 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1018,6 +1018,7 @@ extern int force_sig_info(int, struct siginfo *, struct task_struct *);
1018extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); 1018extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp);
1019extern int kill_pg_info(int, struct siginfo *, pid_t); 1019extern int kill_pg_info(int, struct siginfo *, pid_t);
1020extern int kill_proc_info(int, struct siginfo *, pid_t); 1020extern int kill_proc_info(int, struct siginfo *, pid_t);
1021extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t);
1021extern void do_notify_parent(struct task_struct *, int); 1022extern void do_notify_parent(struct task_struct *, int);
1022extern void force_sig(int, struct task_struct *); 1023extern void force_sig(int, struct task_struct *);
1023extern void force_sig_specific(int, struct task_struct *); 1024extern void force_sig_specific(int, struct task_struct *);