Page MenuHomeFreeBSD

fwip: Fix M_PKTHDR loss in fwip_async_output broadcast path
ClosedPublic

Authored by guest-seuros on Jun 7 2026, 12:50 PM.
Referenced Files
Unknown Object (File)
Thu, Aug 13, 1:22 AM
Unknown Object (File)
Mon, Aug 10, 11:47 AM
Unknown Object (File)
Sun, Aug 9, 9:25 AM
Unknown Object (File)
Sun, Aug 9, 2:37 AM
Unknown Object (File)
Sat, Aug 8, 10:14 PM
Unknown Object (File)
Sat, Aug 8, 5:19 AM
Unknown Object (File)
Fri, Aug 7, 8:53 AM
Unknown Object (File)
Fri, Aug 7, 6:15 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

guest-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
562–568

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

626

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