Module Name:    src
Committed By:   chs
Date:           Fri May 11 04:05:54 UTC 2012

Modified Files:
        src/sys/net: if_ethersubr.c

Log Message:
in ether_ifdetach(), clear if_mowner before releasing what it points to.
fixes PR 42982.


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.189 src/sys/net/if_ethersubr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.188 src/sys/net/if_ethersubr.c:1.189
--- src/sys/net/if_ethersubr.c:1.188	Thu Jun 16 19:47:30 2011
+++ src/sys/net/if_ethersubr.c	Fri May 11 04:05:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.188 2011/06/16 19:47:30 kefren Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.189 2012/05/11 04:05:54 chs Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188 2011/06/16 19:47:30 kefren Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.189 2012/05/11 04:05:54 chs Exp $");
 
 #include "opt_inet.h"
 #include "opt_atalk.h"
@@ -1168,6 +1168,7 @@ ether_ifdetach(struct ifnet *ifp)
 	if_free_sadl(ifp);
 #endif
 
+	ifp->if_mowner = NULL;
 	MOWNER_DETACH(&ec->ec_rx_mowner);
 	MOWNER_DETACH(&ec->ec_tx_mowner);
 }

Reply via email to