diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-01-25 21:59:42 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-01-25 21:59:42 +0000 |
commit | 5e5af103144fbb9564292782f243e83493876a99 (patch) | |
tree | f147bebe2c7a3eac975445ab5bc10067a202707c /sys/net | |
parent | e5898e8827a314c457b664fb262a9bf9f2c7571b (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.c | 6 |
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. |