Page MenuHomeFreeBSD

malloc(9): assert wait flags.
ClosedPublic

Authored by des on Oct 28 2024, 2:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 22, 1:40 PM
Unknown Object (File)
Sat, Dec 7, 5:11 AM
Unknown Object (File)
Nov 29 2024, 4:00 AM
Unknown Object (File)
Nov 27 2024, 4:53 AM
Unknown Object (File)
Nov 26 2024, 5:18 PM
Unknown Object (File)
Nov 22 2024, 9:14 PM
Unknown Object (File)
Nov 20 2024, 5:48 PM
Unknown Object (File)
Nov 20 2024, 5:33 PM
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.Oct 28 2024, 2:56 PM
olce requested changes to this revision.Oct 28 2024, 3:04 PM
olce added inline comments.
sys/kern/kern_malloc.c
530

Parentheses missing.

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