Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net make attach and detach locking symmetric (detaching ...
details: https://anonhg.NetBSD.org/src/rev/d85e6075e475
branches: trunk
changeset: 351360:d85e6075e475
user: christos <christos%NetBSD.org@localhost>
date: Fri Feb 10 20:56:21 2017 +0000
description:
make attach and detach locking symmetric (detaching cloners failed)
diffstat:
sys/net/if.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r a8705ff7121c -r d85e6075e475 sys/net/if.c
--- a/sys/net/if.c Fri Feb 10 20:30:39 2017 +0000
+++ b/sys/net/if.c Fri Feb 10 20:56:21 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.376 2017/02/09 09:30:26 ozaki-r Exp $ */
+/* $NetBSD: if.c,v 1.377 2017/02/10 20:56:21 christos Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.376 2017/02/09 09:30:26 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.377 2017/02/10 20:56:21 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -1653,9 +1653,10 @@
if_clone_detach(struct if_clone *ifc)
{
- KASSERT(mutex_owned(&if_clone_mtx));
+ mutex_enter(&if_clone_mtx);
LIST_REMOVE(ifc, ifc_list);
if_cloners_count--;
+ mutex_exit(&if_clone_mtx);
}
/*
Home |
Main Index |
Thread Index |
Old Index