diff options
Diffstat (limited to 'sys/kern/subr_trap.c')
-rw-r--r-- | sys/kern/subr_trap.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index a371456..6d1ac70 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -172,10 +172,14 @@ userret(struct thread *td, struct trapframe *frame) (td->td_vnet_lpush != NULL) ? td->td_vnet_lpush : "N/A")); #endif #ifdef RACCT - if (racct_enable && p->p_throttled == 1) { + if (racct_enable && p->p_throttled != 0) { PROC_LOCK(p); - while (p->p_throttled == 1) - msleep(p->p_racct, &p->p_mtx, 0, "racct", 0); + while (p->p_throttled != 0) { + msleep(p->p_racct, &p->p_mtx, 0, "racct", + p->p_throttled < 0 ? 0 : p->p_throttled); + if (p->p_throttled > 0) + p->p_throttled = 0; + } PROC_UNLOCK(p); } #endif |