]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Hold a write lock across udp_notify()
authorrstone <rstone@FreeBSD.org>
Thu, 4 Oct 2018 22:03:58 +0000 (22:03 +0000)
committerrstone <rstone@FreeBSD.org>
Thu, 4 Oct 2018 22:03:58 +0000 (22:03 +0000)
commit05d785dcc20cee69f75b6dde36f29bf47021d454
tree35734116e89632b688de076c912a8defebe01223
parent8ccec35d9032a19ab02a0dd35af2fc6915b67dbb
Hold a write lock across udp_notify()

With the new route cache feature udp_notify() will modify the inp when it
needs to invalidate the route cache.  Ensure that we hold a write lock on
the inp before calling the function to ensure that multiple threads don't
race while trying to invalidate the cache (which previously lead to a page
fault).

Differential Revision: https://reviews.freebsd.org/D17246
Reviewed by: sbruno, bz, karels
Sponsored by: Dell EMC Isilon
Approved by: re (gjb)
sys/netinet/udp_usrreq.c