HomeFreeBSD

acquire inp lock around ip6_pcbopt to fix IPV6_TCLASS panic

Description

acquire inp lock around ip6_pcbopt to fix IPV6_TCLASS panic

Simple fix to address panics relating to setting IPV6_TCLASS
with setsockopt(). The premise of this change is that it is
ok to call malloc with M_NOWAIT while holding a lock on the
in6p.

If it later turns out that 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.

Submitted by: Jason Eggnet
Reviewed by: rrs, transport, sbruno
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D16201

Details

Provenance
mmacyAuthored on
Reviewer
rrs
Differential Revision
D16201: acquire inp lock around ip6_pcbopt to fix IPV6_TCLASS panic
Parents
rS336300: epoch_test: fix compile
Branches
Unknown
Tags
Unknown