diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2021-06-28 19:32:20 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2021-06-29 07:24:53 +0000 |
commit | d26ef5c7ac830812f07a02787f25fed5d6f8609e (patch) | |
tree | 61dcc024aad16cc0a2a1eafde15a56b5fcc68f8a | |
parent | 55cc305dfcad0ad7c4f528fa47f7473927e8223a (diff) | |
download | src-d26ef5c7ac830812f07a02787f25fed5d6f8609e.tar.gz src-d26ef5c7ac830812f07a02787f25fed5d6f8609e.zip |
pf: make sure the dtrace probe has safe access to state
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
-rw-r--r-- | sys/netpfil/pf/pf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 69cdc75f0f41..39b032962e84 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6297,11 +6297,12 @@ done: } break; } - if (s) - PF_STATE_UNLOCK(s); SDT_PROBE4(pf, ip, test, done, action, reason, r, s); + if (s) + PF_STATE_UNLOCK(s); + return (action); } #endif /* INET */ |