Page MenuHomeFreeBSD

malloc(9): assert wait flags.
ClosedPublic

Authored by des on Mon, Oct 28, 2:56 PM.
Tags
None
Referenced Files
F103077221: D47309.diff
Wed, Nov 20, 3:35 PM
Unknown Object (File)
Mon, Nov 18, 1:39 PM
Unknown Object (File)
Sun, Nov 10, 5:16 AM
Unknown Object (File)
Wed, Nov 6, 12:09 PM
Unknown Object (File)
Sat, Nov 2, 2:56 AM
Unknown Object (File)
Fri, Nov 1, 11:15 PM
Unknown Object (File)
Thu, Oct 31, 12:41 AM
Subscribers

Details

Summary

The check introduced in d3c11994e1e3 was bogus, combining a non-atomic
“once” flag with an equally non-thread-safe ppsratecheck. Rather than
fix it, just assert what it attempts to enforce: that the malloc flags
must include exactly one of M_WAITOK and M_NOWAIT.

Fixes: d3c11994e1e3de7445305abd0d41dce2b8d3e6dc
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Mon, Oct 28, 2:56 PM
olce requested changes to this revision.Mon, Oct 28, 3:04 PM
olce added inline comments.
sys/kern/kern_malloc.c
530

Parentheses missing.

This revision now requires changes to proceed.Mon, Oct 28, 3:04 PM
des marked an inline comment as done.Tue, Oct 29, 5:41 PM
This revision is now accepted and ready to land.Tue, Oct 29, 5:43 PM
This revision was automatically updated to reflect the committed changes.