diff options
author | ariff <ariff@FreeBSD.org> | 2006-03-30 06:17:03 +0000 |
---|---|---|
committer | ariff <ariff@FreeBSD.org> | 2006-03-30 06:17:03 +0000 |
commit | 469f432d987f41f5538a5ec954b5570ed1c23a48 (patch) | |
tree | 3df3bced59e200a604bd08a2897080f42efffd7c | |
parent | 819c015bdb6d1470486ee4e508d0bbdb1ba5ab62 (diff) | |
download | FreeBSD-src-469f432d987f41f5538a5ec954b5570ed1c23a48.zip FreeBSD-src-469f432d987f41f5538a5ec954b5570ed1c23a48.tar.gz |
Remove paranoid thread hijacking check. It cause wierd behaviour
(dangling channel - process association) especially in threaded
or fork()ed apps.
-rw-r--r-- | sys/dev/sound/pcm/dsp.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 23f2038..4815335 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -306,10 +306,6 @@ dsp_close(struct cdev *i_dev, int flags, int mode, struct thread *td) pcm_lock(d); rdch = i_dev->si_drv1; wrch = i_dev->si_drv2; - if (rdch && td->td_proc->p_pid != rdch->pid) - rdch = NULL; - if (wrch && td->td_proc->p_pid != wrch->pid) - wrch = NULL; pcm_unlock(d); if (rdch || wrch) { @@ -431,11 +427,9 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread * getchns(i_dev, &rdch, &wrch, 0); kill = 0; - if (wrch && ((wrch->flags & CHN_F_DEAD) || - td->td_proc->p_pid != wrch->pid)) + if (wrch && (wrch->flags & CHN_F_DEAD)) kill |= 1; - if (rdch && ((rdch->flags & CHN_F_DEAD) || - td->td_proc->p_pid != rdch->pid)) + if (rdch && (rdch->flags & CHN_F_DEAD)) kill |= 2; if (kill == 3) { relchns(i_dev, rdch, wrch, 0); |