Page MenuHomeFreeBSD

Fix a lock order reversal during jail/vnet creation
Needs ReviewPublic

Authored by syrinx on Jul 4 2020, 8:31 AM.

Details

Reviewers
bz
kp
jamie
Summary

Fix the following LOR reported by the FreeBSD kyua test suite -

1st 0xffffffff81c900e0 allprison (allprison) @ /usr/src/sys/kern/kern_jail.c:984
2nd 0xffffffff81d9b690 vnet_sysinit_sxlock (vnet_sysinit_sxlock) @ /usr/src/sys/net/vnet.c:577

Test Plan

On a kernel with WITNESS options enabled, run an inet test, e.g.

kyua test -k /usr/tests/sys/netinet/Kyuafile forward:fwd_ip_icmp_gw_fast_success

Verify no lock order reversals are reported.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 32132
Build 29643: arc lint + arc unit

Event Timeline

syrinx requested review of this revision.Jul 4 2020, 8:31 AM
syrinx added reviewers: bz, kp, jamie.
syrinx edited the test plan for this revision. (Show Details)

The patch looks good to me, but I'm unable to get that LOR on an unpatched system. Has something been fixed in the meantime?