Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Aug 2002 15:38:06 -0700 (PDT)
From:      Neelkanth Natu <neelnatu@yahoo.com>
To:        freebsd-hackers@freebsd.org
Subject:   Bug in kern_conf.c, allocdev() ?
Message-ID:  <20020807223806.10983.qmail@web14208.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020807223806.10983.qmail>