From 863070bbf602e2d1046c36e9185a59c4a2f3928c Mon Sep 17 00:00:00 2001 From: Eric van Gyzen Date: Fri, 4 Mar 2022 15:01:06 -0600 Subject: [PATCH] ksiginfo_alloc: pass M_WAITOK or M_NOWAIT to uma_zalloc It expects exactly one of those flags. A future commit will assert this. Reviewed by: rstone MFC after: 1 month Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D34451 --- sys/kern/kern_sig.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index b1a70bda3e5..1b6464a4a0c 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -292,9 +292,7 @@ ksiginfo_alloc(int wait) { int flags; - flags = M_ZERO; - if (! wait) - flags |= M_NOWAIT; + flags = M_ZERO | (wait ? M_WAITOK : M_NOWAIT); if (ksiginfo_zone != NULL) return ((ksiginfo_t *)uma_zalloc(ksiginfo_zone, flags)); return (NULL);