]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Teach pf and ipfw to use read locks in inpcbs write than write locks
authorrwatson <rwatson@FreeBSD.org>
Sun, 20 Apr 2008 00:21:54 +0000 (00:21 +0000)
committerrwatson <rwatson@FreeBSD.org>
Sun, 20 Apr 2008 00:21:54 +0000 (00:21 +0000)
commit475838228befd0e9dc448f0e6db920483d471ace
tree1fcfbb3ee5c99f57f95b033d08da73ca3b91e11d
parentfb58e231cabae8a34169c9c9cc7cd781b527f980
Teach pf and ipfw to use read locks in inpcbs write than write locks
when reading credential data from sockets.

Teach pf to unlock the pcbinfo more quickly once it has acquired an
inpcb lock, as the inpcb lock is sufficient to protect the reference.

Assert locks, rather than read locks or write locks, on inpcbs in
subroutines--this is necessary as the inpcb may be passed down with a
write lock from the protocol, or may be passed down with a read lock
from the firewall lookup routine, and either is sufficient.

MFC after: 3 months
sys/contrib/pf/net/pf.c
sys/netinet/ip_fw2.c