Fix panic described in kern/250413 introduced by D25445.
Details
Details
- Reviewers
ae - Group Reviewers
network - Commits
- rS366795: Fix sleepq_add panic happening with too wide net epoch in mcast control.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 34226 Build 31371: arc lint + arc unit
Event Timeline
Comment Actions
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 | IN_MULTI_LOCK() is sx lock, so you still can sleep while in epoch. |
head/sys/netinet/in_mcast.c | ||
---|---|---|
2085 ↗ | (On Diff #78366) | 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. |