Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jun 2014 15:00:43 +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: r267278 - head/sys/rpc
Message-ID:  <201406091500.s59F0hcq055857@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Jun  9 15:00:43 2014
New Revision: 267278
URL: http://svnweb.freebsd.org/changeset/base/267278

Log:
  Fix race in r267221.
  
  MFC after:	2 weeks

Modified:
  head/sys/rpc/svc.c

Modified: head/sys/rpc/svc.c
==============================================================================
--- head/sys/rpc/svc.c	Mon Jun  9 14:46:32 2014	(r267277)
+++ head/sys/rpc/svc.c	Mon Jun  9 15:00:43 2014	(r267278)
@@ -1210,15 +1210,17 @@ svc_run_internal(SVCGROUP *grp, bool_t i
 				 */
 				if (pool->sp_assign) {
 					stpref = pool->sp_assign(st, rqstp);
+					rqstp->rq_thread = stpref;
 					STAILQ_INSERT_TAIL(&stpref->st_reqs,
 					    rqstp, rq_link);
 					mtx_unlock(&stpref->st_lock);
-					rqstp->rq_thread = stpref;
 					if (stpref != st)
 						rqstp = NULL;
-				} else
+				} else {
+					rqstp->rq_thread = st;
 					STAILQ_INSERT_TAIL(&st->st_reqs,
 					    rqstp, rq_link);
+				}
 			}
 		} while (rqstp == NULL && stat == XPRT_MOREREQS
 		    && grp->sg_state != SVCPOOL_CLOSING);



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