diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-03-25 11:39:59 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-03-25 11:39:59 +0000 |
commit | 91e1324ac74746103896c4a557e62d3e40a708f4 (patch) | |
tree | 9247c06114f7aee905e0cd74d79fac84ea729da5 | |
parent | a9364af989a86e9f7fcf874ae600e54b575b5085 (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.c | 4 |
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 |