diff options
author | kp <kp@FreeBSD.org> | 2017-03-22 21:18:18 +0000 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2017-07-17 20:12:49 -0500 |
commit | 8995c199362d57c049f278008c30703cffa626dd (patch) | |
tree | cd4d54c13d8a0e899e438844eead5830f846e66c /usr.bin/rsh | |
parent | 29a346c21cd9bf2913cd4e7d0feaf38ccebcab25 (diff) | |
download | FreeBSD-src-8995c199362d57c049f278008c30703cffa626dd.zip FreeBSD-src-8995c199362d57c049f278008c30703cffa626dd.tar.gz |
pf: Fix possible shutdown race
Prevent possible races in the pf_unload() / pf_purge_thread() shutdown
code. Lock the pf_purge_thread() with the new pf_end_lock to prevent
these races.
Use a shared/exclusive lock, as we need to also acquire another sx lock
(VNET_LIST_RLOCK). It's fine for both pf_purge_thread() and pf_unload()
to sleep,
Pointed out by: eri, glebius, jhb
Differential Revision: https://reviews.freebsd.org/D10026
(cherry picked from commit 6f8b05d841a4f034b227995ff8e33cbe42c9cd30)
Diffstat (limited to 'usr.bin/rsh')
0 files changed, 0 insertions, 0 deletions