From owner-cvs-all Fri Sep 21 15:52: 3 2001 Delivered-To: cvs-all@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 9320637B40C; Fri, 21 Sep 2001 15:51:22 -0700 (PDT) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id QAA38197; Fri, 21 Sep 2001 16:24:31 -0700 (PDT) Date: Fri, 21 Sep 2001 16:24:30 -0700 (PDT) From: Julian Elischer To: John Baldwin Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern sys_generic.c In-Reply-To: <200109212206.f8LM6MF13902@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG huh? in a 1:1 world, the p_flag word is 32 x 4 bits long and happens to be non contiguous, but since they are all in the proc structure, they are still covered by the proc lock, are they not? All the bits in td_flags originally came from p_flag so the proc lock covers them all. If it was using the proc loc before I left it that way.. If it used the sched lock I left it that way. I don't understand why you say that this has changed, because I didn't change that. On Fri, 21 Sep 2001, John Baldwin wrote: > jhb 2001/09/21 15:06:22 PDT > > Modified files: > sys/kern sys_generic.c > Log: > The P_SELECT flag was moved from p->p_flag to td->td_flags, but p_flag > was locked by the proc lock and td_flags is locked by the sched_lock. > The places that read, set, and cleared TDF_SELECT weren't updated, so they > read and modified td_flags w/o holding the sched_lock, meaning that they > could corrupt the per-thread flags field. As an immediate band-aid, > grab sched_lock while reading and manipulating td_flags in relation to > TDF_SELECT. This will probably be cleaned up some later on. > > Revision Changes Path > 1.82 +21 -3 src/sys/kern/sys_generic.c > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message