Page MenuHomeFreeBSD

Fix sleepq_add panic happening with too wide net epoch.
ClosedPublic

Authored by melifaro on Oct 17 2020, 11:28 AM.
Tags
None
Referenced Files
F140988184: D26827.id78354.diff
Tue, Dec 30, 11:17 AM
Unknown Object (File)
Sun, Dec 21, 8:30 AM
Unknown Object (File)
Wed, Dec 17, 2:17 PM
Unknown Object (File)
Tue, Dec 2, 10:50 PM
Unknown Object (File)
Nov 29 2025, 11:39 AM
Unknown Object (File)
Nov 27 2025, 8:38 AM
Unknown Object (File)
Nov 20 2025, 1:48 AM
Unknown Object (File)
Nov 17 2025, 8:07 AM

Details

Summary

Fix panic described in kern/250413 introduced by D25445.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

melifaro added a reviewer: network.
melifaro added a subscriber: kib.

It seems the only solution here is taking ifnet reference. I'm not sure about PCB, probably it can not disappear here.

sys/netinet/in_mcast.c
2087 ↗(On Diff #78344)

IN_MULTI_LOCK() is sx lock, so you still can sleep while in epoch.

This revision is now accepted and ready to land.Oct 17 2020, 5:01 PM
head/sys/netinet/in_mcast.c
2085

I believe it would be not too hard to move this EXIT to before corresponding breaks inside switch. Current structure where ENTER is done inside switch, and you expect all cases escape with epoch entered, is too weird/fragile.