From owner-cvs-src@FreeBSD.ORG Mon Oct 23 15:48:54 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADE6516A529; Mon, 23 Oct 2006 15:48:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 199AA43D53; Mon, 23 Oct 2006 15:48:52 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k9NFmWgk001019; Mon, 23 Oct 2006 11:48:43 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: David Xu Date: Mon, 23 Oct 2006 11:45:47 -0400 User-Agent: KMail/1.9.1 References: <200610201619.k9KGJLZH076566@repoman.freebsd.org> <200610210858.04180.davidxu@freebsd.org> In-Reply-To: <200610210858.04180.davidxu@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610231145.48005.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 23 Oct 2006 11:48:44 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/2081/Mon Oct 23 09:43:22 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern kern_sig.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Oct 2006 15:48:54 -0000 On Friday 20 October 2006 20:58, David Xu wrote: > On Saturday 21 October 2006 00:19, John Baldwin wrote: > > jhb 2006-10-20 16:19:21 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/kern kern_sig.c > > Log: > > Remove the check that prevented signals from being delivered to exiting > > processes. It was originally added back when support for Linux threads > > (and thus shared sigacts objects) was added, but no one knows why. My > > guess is that at some point during the Linux threads patches, the sigacts > > object was torn down during exit1(), so this check was added to prevent > > a panic for that race. However, the stuff that was actually committed to > > the tree doesn't teardown sigacts until wait() making the above race > > moot. Re-allowing signals here lets one interrupt a NFS request during > > process teardown (such as closing descriptors) on an interruptible mount. > > > > Requested by: kib (long time ago) > > MFC after: 1 week > > > > Revision Changes Path > > 1.333 +1 -3 src/sys/kern/kern_sig.c > This commit opens a window that may cause memory leak, since we have > signal queue in -CURRENT now, signal queue uses memory, before this > change, the P_WEXIT will prevents new signal to be queued, after the > flag is set in kern_exit, we call signqueue_flush to free memory. I think > we should move sigqueue_flush down to a safe point where the > PROC lock is no longer unlocked or move it to a place after p_state is set > to PRS_ZOMBIE. Or just free it during wait() when most other things about a process are freed (sigacts, limits, etc.). -- John Baldwin