From owner-svn-src-all@FreeBSD.ORG Thu Jul 10 21:05:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7603A8E5; Thu, 10 Jul 2014 21:05:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63B76249B; Thu, 10 Jul 2014 21:05:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6AL5kjt013753; Thu, 10 Jul 2014 21:05:46 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6AL5kOJ013752; Thu, 10 Jul 2014 21:05:46 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201407102105.s6AL5kOJ013752@svn.freebsd.org> From: Mateusz Guzik Date: Thu, 10 Jul 2014 21:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268507 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2014 21:05:46 -0000 Author: mjg Date: Thu Jul 10 21:05:45 2014 New Revision: 268507 URL: http://svnweb.freebsd.org/changeset/base/268507 Log: Don't zero fd_nfiles during fdp destruction. Code trying to take a look has to check fd_refcnt and it is 0 by that time. This is a follow up to r268505, without this the code would leak memory for tables bigger than the default. MFC after: 1 week Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Jul 10 21:02:58 2014 (r268506) +++ head/sys/kern/kern_descrip.c Thu Jul 10 21:05:45 2014 (r268507) @@ -2034,8 +2034,6 @@ fdescfree(struct thread *td) return; } - fdp->fd_nfiles = 0; - cdir = fdp->fd_cdir; fdp->fd_cdir = NULL; rdir = fdp->fd_rdir;