summaryrefslogtreecommitdiff
path: root/sys/net/ifq.h
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2024-11-20 02:18:46 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2024-11-20 02:18:46 +0000
commit9bb5f5946fe1bfd777b4367d0843d238d951f801 (patch)
tree94a016e3bc295c6e20100f7786b15b4218a26284 /sys/net/ifq.h
parent2acd40fdb3af267ac7ecad29ede14615eaaf54d3 (diff)
provide ifq_deq_set_oactive.
ifq_deq_set_oactive is a variation on ifq_set_oactive that can be called inside an if_deq_begin "transaction". afresh@ found de(4) was calling ifq_set_oactive while holding the ifq mutex via ifq_deq_begin, which led to a panic because ifq_set_oactive also tries to take the ifq mutex. ifq_deq_set_oactive assumes the caller is already holding the mutex. de(4) is confusing, so it seemed simpler to add a small tweak to ifqs than try and do major surgery on such a hairy driver. tested by afresh@
Diffstat (limited to 'sys/net/ifq.h')
-rw-r--r--sys/net/ifq.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/ifq.h b/sys/net/ifq.h
index e7ee259e3ab..18fdb4180ef 100644
--- a/sys/net/ifq.h
+++ b/sys/net/ifq.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifq.h,v 1.41 2023/11/10 15:51:24 bluhm Exp $ */
+/* $OpenBSD: ifq.h,v 1.42 2024/11/20 02:18:45 dlg Exp $ */
/*
* Copyright (c) 2015 David Gwynne <dlg@openbsd.org>
@@ -444,6 +444,7 @@ void ifq_q_leave(struct ifqueue *, void *);
void ifq_serialize(struct ifqueue *, struct task *);
void ifq_barrier(struct ifqueue *);
void ifq_set_oactive(struct ifqueue *);
+void ifq_deq_set_oactive(struct ifqueue *);
int ifq_deq_sleep(struct ifqueue *, struct mbuf **, int, int,
const char *, volatile unsigned int *,