Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Destroy the mutex when detaching ppp. Otherwise on ...



details:   https://anonhg.NetBSD.org/src/rev/ce7b4a14ebb7
branches:  trunk
changeset: 346917:ce7b4a14ebb7
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sat Aug 06 22:54:34 2016 +0000

description:
Destroy the mutex when detaching ppp.  Otherwise on a re-attach (ie,
module reload) we can end up with a panic "lock already initialized"

diffstat:

 sys/net/if_ppp.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 915c4c250263 -r ce7b4a14ebb7 sys/net/if_ppp.c
--- a/sys/net/if_ppp.c  Sat Aug 06 22:38:18 2016 +0000
+++ b/sys/net/if_ppp.c  Sat Aug 06 22:54:34 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ppp.c,v 1.155 2016/08/06 12:48:23 christos Exp $    */
+/*     $NetBSD: if_ppp.c,v 1.156 2016/08/06 22:54:34 pgoyette Exp $    */
 /*     Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp       */
 
 /*
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.155 2016/08/06 12:48:23 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.156 2016/08/06 22:54:34 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "ppp.h"
@@ -263,6 +263,8 @@
        if (error == 0)
                error = ttyldisc_detach(&ppp_disc);
 
+       mutex_destroy(&ppp_list_lock);
+
        return error;
 }
 



Home | Main Index | Thread Index | Old Index