linux/kernel
Harald Welte 46113830a1 [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>
2005-10-10 16:16:33 -07:00
..
irq
power [PATCH] x86_64: Set up safe page tables during resume 2005-10-10 08:36:46 -07:00
acct.c
audit.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
auditsc.c
capability.c
compat.c
configs.c
cpu.c
cpuset.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
crash_dump.c
dma.c
exec_domain.c
exit.c Fix inequality comparison against "task->state" 2005-10-01 11:04:18 -07:00
extable.c
fork.c
futex.c
intermodule.c
itimer.c
kallsyms.c
Kconfig.hz
Kconfig.preempt
kexec.c
kfifo.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
kmod.c
kprobes.c
ksysfs.c
kthread.c
Makefile
module.c
panic.c
params.c [PATCH] Ignore trailing whitespace on kernel parameters correctly 2005-09-28 07:46:41 -07:00
pid.c
posix-cpu-timers.c
posix-timers.c
printk.c
profile.c
ptrace.c
rcupdate.c
resource.c
sched.c
seccomp.c
signal.c [PATCH] Fix signal sending in usbdevio on async URB completion 2005-10-10 16:16:33 -07:00
softirq.c
softlockup.c
spinlock.c
stop_machine.c
sys.c
sys_ni.c
sysctl.c
time.c
timer.c
uid16.c
user.c
wait.c
workqueue.c