Page MenuHomeFreeBSD

fwip: Fix M_PKTHDR loss in fwip_async_output broadcast path
ClosedPublic

Authored by seuros on Jun 7 2026, 12:50 PM.
Referenced Files
Unknown Object (File)
Tue, Sep 8, 2:47 PM
Unknown Object (File)
Mon, Sep 7, 7:01 PM
Unknown Object (File)
Mon, Sep 7, 3:52 PM
Unknown Object (File)
Sun, Sep 6, 11:59 AM
Unknown Object (File)
Sun, Sep 6, 10:30 AM
Unknown Object (File)
Sat, Sep 5, 9:35 AM
Unknown Object (File)
Sat, Sep 5, 5:53 AM
Unknown Object (File)
Sat, Sep 5, 5:41 AM
Subscribers
None

Details

Summary

M_PREPEND in the broadcast branch may call m_prepend(9) which allocates
a new head mbuf and calls m_move_pkthdr(), stripping M_PKTHDR from the
old mbuf.

xfer->mbuf was set before M_PREPEND, so it pointed at the
deheadered old mbuf. bus_dmamap_load_mbuf(9) asserts M_PKTHDR and
panics.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 73733
Build 70616: arc lint + arc unit

Event Timeline

seuros created this revision.
This revision is now accepted and ready to land.Jun 8 2026, 3:54 AM

Looks sane to me.

sys/dev/firewire/if_fwip.c
602

So that we do not need the previous assignment xfer->mbuf = NULL.

666

A nit here.

zlei retitled this revision from fix(fwip): fix M_PKTHDR loss in fwip_async_output broadcast path to fwip: Fix M_PKTHDR loss in fwip_async_output broadcast path.Jun 8 2026, 7:37 AM