From owner-freebsd-hackers Wed Aug 7 15:38: 9 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6933337B400 for ; Wed, 7 Aug 2002 15:38:07 -0700 (PDT) Received: from web14208.mail.yahoo.com (web14208.mail.yahoo.com [216.136.173.72]) by mx1.FreeBSD.org (Postfix) with SMTP id 268FE43E70 for ; Wed, 7 Aug 2002 15:38:07 -0700 (PDT) (envelope-from neelnatu@yahoo.com) Message-ID: <20020807223806.10983.qmail@web14208.mail.yahoo.com> Received: from [208.2.250.250] by web14208.mail.yahoo.com via HTTP; Wed, 07 Aug 2002 15:38:06 PDT Date: Wed, 7 Aug 2002 15:38:06 -0700 (PDT) From: Neelkanth Natu Subject: Bug in kern_conf.c, allocdev() ? To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, In allocdev() in kern_conf.c, it seems like we will not be reusing any of the freed specinfo structs hanging off 'dev_free', once the value of 'stashed >= DEVT_STASH'. The diff below mallocs a new specinfo struct only if we have run out of our stash AND there are no specinfo structs to reuse in 'dev_free'. Hope I am not missing something obvious here ... thanks Neel kern_conf.c: @@ -182,7 +182,7 @@ static int stashed; struct specinfo *si; - if (stashed >= DEVT_STASH) { + if ((stashed >= DEVT_STASH) && !LIST_FIRST(&dev_free)) { MALLOC(si, struct specinfo *, sizeof(*si), M_DEVT, M_USE_RESERVE | M_ZERO); } else if (LIST_FIRST(&dev_free)) { __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message