From owner-svn-src-head@FreeBSD.ORG Sat Jun 16 12:56:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ACAF9106564A; Sat, 16 Jun 2012 12:56:37 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 981CA8FC0C; Sat, 16 Jun 2012 12:56:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5GCubAC045154; Sat, 16 Jun 2012 12:56:37 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5GCubwO045152; Sat, 16 Jun 2012 12:56:37 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201206161256.q5GCubwO045152@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 16 Jun 2012 12:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237158 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jun 2012 12:56:37 -0000 Author: pjd Date: Sat Jun 16 12:56:36 2012 New Revision: 237158 URL: http://svn.freebsd.org/changeset/base/237158 Log: Revert r237073. 'td' can be NULL here. MFC after: 1 month Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sat Jun 16 09:17:21 2012 (r237157) +++ head/sys/kern/kern_descrip.c Sat Jun 16 12:56:36 2012 (r237158) @@ -2104,9 +2104,6 @@ closef(struct file *fp, struct thread *t struct filedesc *fdp; struct file *fp_object; - fdp = td->td_proc->p_fd; - FILEDESC_UNLOCK_ASSERT(fdp); - /* * POSIX record locking dictates that any close releases ALL * locks owned by this process. This is handled by setting @@ -2142,6 +2139,7 @@ closef(struct file *fp, struct thread *t * Handle special case where file descriptor table is * shared between multiple process leaders. */ + fdp = td->td_proc->p_fd; FILEDESC_XLOCK(fdp); for (fdtol = fdtol->fdl_next; fdtol != td->td_proc->p_fdtol;