diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2021-06-02 01:37:11 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2021-06-02 01:37:11 +0000 |
commit | 085faee6cbc4ec2f1b950ed489c179756e31cc8f (patch) | |
tree | 2430e059b754b690e4aee8522ca237cd9f7474d2 /sys/net | |
parent | 440807dbd94db84bcd97dc085e4f5b640222c6f6 (diff) |
only read the if_bpf pointer once.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_tpmr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_tpmr.c b/sys/net/if_tpmr.c index 50ac1ed91b4..f6eb99f347c 100644 --- a/sys/net/if_tpmr.c +++ b/sys/net/if_tpmr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tpmr.c,v 1.29 2021/06/02 01:36:10 dlg Exp $ */ +/* $OpenBSD: if_tpmr.c,v 1.30 2021/06/02 01:37:10 dlg Exp $ */ /* * Copyright (c) 2019 The University of Queensland @@ -368,7 +368,7 @@ tpmr_input(struct ifnet *ifp0, struct mbuf *m, uint64_t dst, void *brport) counters_pkt(ifp->if_counters, ifc_ipackets, ifc_ibytes, len); #if NBPFILTER > 0 - if_bpf = ifp->if_bpf; + if_bpf = READ_ONCE(ifp->if_bpf); if (if_bpf) { if (bpf_mtap(if_bpf, m, 0)) goto drop; |