git: 863070bbf602 - main - ksiginfo_alloc: pass M_WAITOK or M_NOWAIT to uma_zalloc
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 26 Mar 2022 01:11:42 UTC
The branch main has been updated by vangyzen:
URL: https://cgit.FreeBSD.org/src/commit/?id=863070bbf602e2d1046c36e9185a59c4a2f3928c
commit 863070bbf602e2d1046c36e9185a59c4a2f3928c
Author: Eric van Gyzen <vangyzen@FreeBSD.org>
AuthorDate: 2022-03-04 21:01:06 +0000
Commit: Eric van Gyzen <vangyzen@FreeBSD.org>
CommitDate: 2022-03-26 01:10:37 +0000
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 b1a70bda3e55..1b6464a4a0cc 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);