Page MenuHomeFreeBSD

acquire inp lock around ip6_pcbopt to fix IPV6_TCLASS panic

Authored by on Jul 9 2018, 7:47 PM.



Hopefully simple fix to address panics relating to setting IPV6_TCLASS with setsockopt().

The premise of this fix is that it is ok to call malloc with M_NOWAIT while holding a lock on the in6p.

If it is not ok, then major surgery will be required, as ip6_setpktopt() will have to be fixed (as it also calls malloc with M_NOWAIT) which pulls in the ip6_pcbopts(), ip6_setpktopts(), ip6_setpktopt() call chain. The other call chain does have to be fixed but it can be done in a different review (and with relative ease) if this strategy works out.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

use correct constants edited the summary of this revision. (Show Details)Jul 9 2018, 8:02 PM
sbruno accepted this revision.Jul 10 2018, 11:24 PM
This revision is now accepted and ready to land.Jul 10 2018, 11:24 PM
rrs accepted this revision.Jul 12 2018, 4:26 PM
This revision was automatically updated to reflect the committed changes.