Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jan 2009 17:51:15 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r186907 - head/sys/netgraph
Message-ID:  <200901081751.n08HpFV3028866@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Jan  8 17:51:15 2009
New Revision: 186907
URL: http://svn.freebsd.org/changeset/base/186907

Log:
  Mark ng_vjc node as FORCE_WRITER to protect slcompress state.
  I think it can be the reason of livelock in netgraph reported by some
  mpd users.
  
  MFC after:	3 days

Modified:
  head/sys/netgraph/ng_vjc.c

Modified: head/sys/netgraph/ng_vjc.c
==============================================================================
--- head/sys/netgraph/ng_vjc.c	Thu Jan  8 17:47:45 2009	(r186906)
+++ head/sys/netgraph/ng_vjc.c	Thu Jan  8 17:51:15 2009	(r186907)
@@ -249,6 +249,9 @@ ng_vjc_constructor(node_p node)
 
 	NG_NODE_SET_PRIVATE(node, priv);
 
+	/* slcompress is not thread-safe. Protect it's state here. */
+	NG_NODE_FORCE_WRITER(node);
+
 	/* Done */
 	return (0);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901081751.n08HpFV3028866>