Page MenuHomeFreeBSD

mld6: Ensure that mld_domifattach() always succeeds
ClosedPublic

Authored by markj on Apr 18 2022, 4:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 13, 6:01 PM
Unknown Object (File)
Wed, May 13, 5:43 PM
Unknown Object (File)
Wed, May 13, 5:29 PM
Unknown Object (File)
May 2 2026, 10:05 PM
Unknown Object (File)
Apr 29 2026, 12:15 PM
Unknown Object (File)
Apr 19 2026, 10:52 PM
Unknown Object (File)
Apr 17 2026, 7:57 AM
Unknown Object (File)
Apr 17 2026, 12:37 AM

Details

Summary

mld_domifattach() does a memory allocation under the global MLD mutex,
and so can fail (but no error handling prevents a null pointer
dereference in this case). However, the mutex is only needed when
updating the global softc list; the allocation and static initialization
of the softc does not require this mutex. So, reduce the scope of the
mutex and use M_WAITOK for the allocation.

No functional change intended.

PR: 261457

Diff Detail

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

Event Timeline

markj requested review of this revision.Apr 18 2022, 4:17 PM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 21 2022, 5:27 PM
This revision was automatically updated to reflect the committed changes.