diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-04-17 09:41:45 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-04-17 09:41:45 +0000 |
commit | 1af602ed16eb5f03980642d7ae0fed6e3fc12b12 (patch) | |
tree | 3398cfedfe9a093fc8d260a0570cf520445714bf | |
parent | d5dd2857a13ce3175f712d8a547cfc2160b1c23a (diff) |
dogetrusage() must be called with the KERNEL_LOCK held for now.
OK mpi@
-rw-r--r-- | sys/kern/kern_resource.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 9885396b811..789c980625d 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_resource.c,v 1.80 2023/09/13 14:25:49 claudio Exp $ */ +/* $OpenBSD: kern_resource.c,v 1.81 2024/04/17 09:41:44 claudio Exp $ */ /* $NetBSD: kern_resource.c,v 1.38 1996/10/23 07:19:38 matthias Exp $ */ /*- @@ -476,8 +476,9 @@ dogetrusage(struct proc *p, int who, struct rusage *rup) struct process *pr = p->p_p; struct proc *q; - switch (who) { + KERNEL_ASSERT_LOCKED(); + switch (who) { case RUSAGE_SELF: /* start with the sum of dead threads, if any */ if (pr->ps_ru != NULL) |