summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-01-25 21:59:42 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-01-25 21:59:42 +0000
commit5e5af103144fbb9564292782f243e83493876a99 (patch)
treef147bebe2c7a3eac975445ab5bc10067a202707c /sys/net
parente5898e8827a314c457b664fb262a9bf9f2c7571b (diff)
Introduce a hack to remove false-positives when looking for memory
allocation that can sleep while holding the NET_LOCK(). To be removed once we're confident the remaining code paths are safe. Discussed with deraadt@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 8d6721a7d6d..8719c7d30a7 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.481 2017/01/25 06:15:50 mpi Exp $ */
+/* $OpenBSD: if.c,v 1.482 2017/01/25 21:59:41 mpi Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -234,6 +234,10 @@ struct task if_input_task_locked = TASK_INITIALIZER(if_netisr, NULL);
* are introduced in IP output paths.
*/
struct rwlock netlock = RWLOCK_INITIALIZER("netlock");
+#if 1
+/* tsleep() is ok if inside ifioctl(). */
+int inifioctl;
+#endif
/*
* Network interface utility routines.