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
F163524948: D57495.diff
Fri, Jul 24, 3:19 AM
Unknown Object (File)
Sun, Jul 19, 4:06 AM
Unknown Object (File)
Thu, Jul 16, 3:32 AM
Unknown Object (File)
Thu, Jul 16, 2:06 AM
Unknown Object (File)
Wed, Jul 15, 7:25 AM
Unknown Object (File)
Wed, Jul 15, 7:25 AM
Unknown Object (File)
Tue, Jul 14, 5:03 AM
Unknown Object (File)
Sat, Jul 11, 2:58 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