HomeFreeBSD

mbuf: make m_unshare() allow unmapped mbufs

Description

mbuf: make m_unshare() allow unmapped mbufs

m_unshare() had crashed if unmapped mbufs exist in the mbuf chain.
This was because memcpy() with mtod() was used without making sure that
the mbuf was mapped. Use m_copydata() that cares unmapped mbufs instead.

Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D58189

Details

Provenance
takahiro.kurosawa_gmail.comAuthored on Jul 15 2026, 8:28 AM
kpCommitted on Jul 15 2026, 11:44 AM
Reviewer
gallatin
Differential Revision
D58189: mbuf: make m_unshare() allow unmapped mbufs
Parents
rG40c611d0939f: pfctl: fix incorrect errno checks
Branches
Unknown
Tags
Unknown