mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-06-02 03:53:52 +08:00
Delete struct proc p_mtx lock
Usage of this lock is highly dangerous since agents may assume that this lock is actually used for process management. There is only one process in RTEMS.
This commit is contained in:
parent
0bcf34156b
commit
3842b81723
@ -264,10 +264,15 @@ crypto_terminate(struct proc **pp, void *q)
|
||||
*pp = NULL;
|
||||
if (p) {
|
||||
wakeup_one(q);
|
||||
#ifndef __rtems__
|
||||
PROC_LOCK(p); /* NB: insure we don't miss wakeup */
|
||||
CRYPTO_DRIVER_UNLOCK(); /* let crypto_finis progress */
|
||||
msleep(p, &p->p_mtx, PWAIT, "crypto_destroy", 0);
|
||||
PROC_UNLOCK(p);
|
||||
#else /* __rtems__ */
|
||||
/* FIXME: The hacks with the PROC_LOCK() do not work on RTEMS */
|
||||
BSD_ASSERT(0);
|
||||
#endif /* __rtems__ */
|
||||
CRYPTO_DRIVER_LOCK();
|
||||
}
|
||||
}
|
||||
|
@ -576,7 +576,6 @@ struct proc {
|
||||
struct cv p_pwait; /* (*) wait cv for exit/exec */
|
||||
#else /* __rtems__ */
|
||||
struct ucred *p_ucred; /* (c) Process owner's identity. */
|
||||
struct mtx p_mtx; /* (n) Lock for this struct. */
|
||||
rtems_id p_pid;
|
||||
int p_fibnum; /* in this routing domain XXX MRT */
|
||||
#endif /* __rtems__ */
|
||||
|
@ -662,9 +662,7 @@ kern_sendit(td, s, mp, flags, control, segflg)
|
||||
/* Generation of SIGPIPE can be controlled per socket */
|
||||
if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) &&
|
||||
!(flags & MSG_NOSIGNAL)) {
|
||||
PROC_LOCK(td->td_proc);
|
||||
killinfo(td->td_proc->p_pid, SIGPIPE, NULL);
|
||||
PROC_UNLOCK(td->td_proc);
|
||||
killinfo(td->td_proc->p_pid, SIGPIPE, NULL);
|
||||
}
|
||||
}
|
||||
if (error == 0)
|
||||
|
@ -216,7 +216,6 @@ rtems_bsd_threads_init(void *arg __unused)
|
||||
FIXME_ucred.cr_ngroups = 1; /* group 0 */
|
||||
|
||||
FIXME_proc.p_ucred = crhold(&FIXME_ucred);
|
||||
mtx_init(&FIXME_proc.p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK);
|
||||
FIXME_proc.p_pid = getpid();
|
||||
FIXME_proc.p_fibnum = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user