Module Name:    src
Committed By:   ozaki-r
Date:           Wed Dec 21 04:01:57 UTC 2016

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

Log Message:
Don't call psref_target_destroy unless NET_MPSAFE

We don't need it if NET_MPSAFE off and also it causes lockup
sometimes because of calling it with holding softnet_lock.


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/sys/net/route.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/route.c
diff -u src/sys/net/route.c:1.184 src/sys/net/route.c:1.185
--- src/sys/net/route.c:1.184	Wed Dec 21 00:33:49 2016
+++ src/sys/net/route.c	Wed Dec 21 04:01:57 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.184 2016/12/21 00:33:49 ozaki-r Exp $	*/
+/*	$NetBSD: route.c,v 1.185 2016/12/21 04:01:57 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.184 2016/12/21 00:33:49 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.185 2016/12/21 04:01:57 ozaki-r Exp $");
 
 #include <sys/param.h>
 #ifdef RTFLUSH_DEBUG
@@ -695,7 +695,9 @@ _rt_free(struct rtentry *rt)
 	RT_REFCNT_TRACE(rt);
 	KASSERTMSG(rt->rt_refcnt >= 0, "refcnt=%d", rt->rt_refcnt);
 	rt_wait_refcnt("free", rt, 0);
+#ifdef NET_MPSAFE
 	psref_target_destroy(&rt->rt_psref, rt_psref_class);
+#endif
 
 	rt_assert_inactive(rt);
 	rttrash--;

Reply via email to