Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Aug 2010 23:23:00 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r211830 - head/sys/rpc
Message-ID:  <201008252323.o7PNN0ST025510@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Wed Aug 25 23:23:00 2010
New Revision: 211830
URL: http://svn.freebsd.org/changeset/base/211830

Log:
  Add mutex locking for the call to replay_prune() in
  replay_setsize(), since replay_prune() expects the
  rc_lock to be held when it is called.
  
  MFC after:	2 weeks

Modified:
  head/sys/rpc/replay.c

Modified: head/sys/rpc/replay.c
==============================================================================
--- head/sys/rpc/replay.c	Wed Aug 25 22:48:18 2010	(r211829)
+++ head/sys/rpc/replay.c	Wed Aug 25 23:23:00 2010	(r211830)
@@ -90,8 +90,10 @@ void
 replay_setsize(struct replay_cache *rc, size_t newmaxsize)
 {
 
+	mtx_lock(&rc->rc_lock);
 	rc->rc_maxsize = newmaxsize;
 	replay_prune(rc);
+	mtx_unlock(&rc->rc_lock);
 }
 
 void



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