Date: Sat, 26 Mar 2022 01:11:42 GMT From: Eric van Gyzen <vangyzen@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 863070bbf602 - main - ksiginfo_alloc: pass M_WAITOK or M_NOWAIT to uma_zalloc Message-ID: <202203260111.22Q1BgmE063653@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203260111.22Q1BgmE063653>