diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2003-04-02 21:54:51 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2003-04-02 21:54:51 +0000 |
| commit | 6751370f6f52a82f9950eaf7e63b611830d38f29 (patch) | |
| tree | 192d39aebb14c6c94b48ca15c4496b9f8ebb845d | |
| parent | 316aed030e14b02847d5e4fee15fd297c5b1dc5e (diff) | |
Notes
| -rw-r--r-- | sys/kern/subr_bus.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index b6e8d213ee79..6c5955858d40 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -383,6 +383,7 @@ static void devaddq(const char *type, const char *what, device_t dev) { struct dev_event_info *n1 = NULL; + struct proc *p; char *data = NULL; char *loc; const char *parstr; @@ -412,8 +413,12 @@ devaddq(const char *type, const char *what, device_t dev) cv_broadcast(&devsoftc.cv); mtx_unlock(&devsoftc.mtx); selwakeup(&devsoftc.sel); - if (devsoftc.async_proc) - psignal(devsoftc.async_proc, SIGIO); + p = devsoftc.async_proc; + if (p != NULL) { + PROC_LOCK(p); + psignal(p, SIGIO); + PROC_UNLOCK(p); + } return; bad:; free(data, M_BUS); |
