summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_rctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_rctl.c')
-rw-r--r--sys/kern/kern_rctl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/kern/kern_rctl.c b/sys/kern/kern_rctl.c
index bf445f6..a8a463f 100644
--- a/sys/kern/kern_rctl.c
+++ b/sys/kern/kern_rctl.c
@@ -363,6 +363,17 @@ rctl_enforce(struct proc *p, int resource, uint64_t amount)
rule->rr_action));
/*
+ * We're supposed to send a signal, but the process
+ * is not fully initialized yet, probably because we
+ * got called from fork1(). For now just deny the
+ * allocation instead.
+ */
+ if (p->p_state != PRS_NORMAL) {
+ should_deny = 1;
+ continue;
+ }
+
+ /*
* We're using the fact that RCTL_ACTION_SIG* values
* are equal to their counterparts from sys/signal.h.
*/
OpenPOWER on IntegriCloud