summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2020-03-25 11:39:59 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2020-03-25 11:39:59 +0000
commit91e1324ac74746103896c4a557e62d3e40a708f4 (patch)
tree9247c06114f7aee905e0cd74d79fac84ea729da5
parenta9364af989a86e9f7fcf874ae600e54b575b5085 (diff)
Grab the NET_LOCK() before calling pipex_iface_stop().
This function calls pipex_destroy_session() which requires the lock and pipex_ioctl() already calls it with the NET_LOCK() held. From Vitaliy Makkoveev.
-rw-r--r--sys/net/pipex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/pipex.c b/sys/net/pipex.c
index 44564d3281c..a1df79f6931 100644
--- a/sys/net/pipex.c
+++ b/sys/net/pipex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pipex.c,v 1.107 2019/01/31 18:01:14 millert Exp $ */
+/* $OpenBSD: pipex.c,v 1.108 2020/03/25 11:39:58 mpi Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -197,7 +197,9 @@ void
pipex_iface_fini(struct pipex_iface_context *pipex_iface)
{
pool_put(&pipex_session_pool, pipex_iface->multicast_session);
+ NET_LOCK();
pipex_iface_stop(pipex_iface);
+ NET_UNLOCK();
}
int