Source-Changes-HG archive

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

[src/trunk]: src/sys/net Initialise index_gen_mtx before use.



details:   https://anonhg.NetBSD.org/src/rev/109ab345e4d3
branches:  trunk
changeset: 747530:109ab345e4d3
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Sep 19 11:02:07 2009 +0000

description:
Initialise index_gen_mtx before use.

diffstat:

 sys/net/if.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r b994bb4ac78d -r 109ab345e4d3 sys/net/if.c
--- a/sys/net/if.c      Sat Sep 19 09:00:58 2009 +0000
+++ b/sys/net/if.c      Sat Sep 19 11:02:07 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.c,v 1.237 2009/09/16 15:23:04 pooka Exp $   */
+/*     $NetBSD: if.c,v 1.238 2009/09/19 11:02:07 skrll 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.237 2009/09/16 15:23:04 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.238 2009/09/19 11:02:07 skrll Exp $");
 
 #include "opt_inet.h"
 
@@ -193,7 +193,6 @@
                             IPV6CTL_IFQ, &ip6intrq);}
 #endif /* INET6 */
 
-       mutex_init(&index_gen_mtx, MUTEX_DEFAULT, IPL_NONE);
        callout_init(&if_slowtimo_ch, 0);
        if_slowtimo(NULL);
 }
@@ -206,6 +205,8 @@
 ifinit1(void)
 {
 
+       mutex_init(&index_gen_mtx, MUTEX_DEFAULT, IPL_NONE);
+
 #ifdef PFIL_HOOKS
        if_pfil.ph_type = PFIL_TYPE_IFNET;
        if_pfil.ph_ifnet = NULL;



Home | Main Index | Thread Index | Old Index