Page MenuHomeFreeBSD

Assert that malloc(9) and uma_zalloc_arg(9) are not called from non-sleepable threads or interrupts.
Needs ReviewPublic

Authored by bdrewery on Sep 25 2014, 1:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 11, 12:19 AM
Unknown Object (File)
Sun, Sep 28, 2:53 AM
Unknown Object (File)
Mon, Sep 22, 10:27 PM
Unknown Object (File)
Sep 8 2025, 5:50 PM
Unknown Object (File)
Aug 29 2025, 12:01 PM
Unknown Object (File)
Aug 25 2025, 8:18 PM
Unknown Object (File)
Aug 14 2025, 10:05 PM
Unknown Object (File)
Aug 3 2025, 8:18 AM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

KASSERT_WARN() is used for now since the impact is not known.

This is based on the patch and report from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193696

A problem I know of is that malloc(9) calls uma_zalloc(9) and due to the non-panic KASSERT_WARN, it shows the same message again. It would not make sense to only place the KASSERT_WARN only in uma_zalloc_arg(9) for now as then memguard and redzone would be missing the check.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bdrewery retitled this revision from to Assert that malloc(9) and uma_zalloc_arg(9) are not called from non-sleepable threads or interrupts..
bdrewery updated this object.
bdrewery edited the test plan for this revision. (Show Details)

Remove use of KASSERT_WARN for interrupt check in uma_zallog_arg() and move
the KASSERTS for interrupt contexts outside of the M_WAITOK check.

Updating D830: Assert that malloc(9) and uma_zalloc_arg(9) are not called from non-sleepable

threads or interrupts.

Whitespace

Updating D830: Assert that malloc(9) and uma_zalloc_arg(9) are not called from non-sleepable

threads or interrupts.