Page MenuHomeFreeBSD

mbuf: add mbuf information to KASSERTs
ClosedPublic

Authored by bz on Apr 13 2025, 11:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 15, 6:55 AM
Unknown Object (File)
Wed, Oct 8, 6:56 PM
Unknown Object (File)
Sun, Oct 5, 12:42 PM
Unknown Object (File)
Tue, Sep 23, 6:16 PM
Unknown Object (File)
Sep 11 2025, 4:59 PM
Unknown Object (File)
Sep 11 2025, 2:23 AM
Unknown Object (File)
Sep 10 2025, 12:21 AM
Unknown Object (File)
Sep 3 2025, 12:05 AM
Subscribers

Details

Summary

Be more consistent about printing the mbuf pointer in KASSERT messages.
This massively helps debugging and we were already doing a good job at
it.

Also replace some handrolled KASSERTs with M_ASSERTPKTHDR() for fewer
copies of the check logic.

In m_align() move the msg into the KASSERT given after it was moved
here in ed6a66ca6c206 the msg is only used in one place.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

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

Event Timeline

bz requested review of this revision.Apr 13 2025, 11:11 PM
glebius added a subscriber: glebius.

Thanks! Definitely will speed up analyzing crashes when debugger fails to figure out which register holds the pointer.

This revision is now accepted and ready to land.Apr 14 2025, 6:53 PM
zlei added a subscriber: zlei.

Looks good to me.

This revision was automatically updated to reflect the committed changes.