From owner-freebsd-bugs Wed May 10 0: 0: 5 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 189F037B642 for ; Wed, 10 May 2000 00:00:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id AAA08664; Wed, 10 May 2000 00:00:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Wed, 10 May 2000 00:00:03 -0700 (PDT) Message-Id: <200005100700.AAA08664@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: David Malone Subject: Re: kern/18471: Checking freeing of mbufs. Reply-To: David Malone Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/18471; it has been noted by GNATS. From: David Malone To: Jin Guojun (FTG staff) Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: kern/18471: Checking freeing of mbufs. Date: Wed, 10 May 2000 07:54:54 +0100 > > It would be better if the kernel paniced at the time of the second > > free, as opposed to some time later when the entry which has been > > freed twice gets reused while still in use! > I disagree to panic at this point. The better fixing is just printing > out some error message and do nothing for refreeing code. Whoever writes > such driver code will know what happens. That wouldn't really be consistant with the other reference counters in the kernel (vnode reference counters would be the main example in my mind). At the stage when this happens the kernel has definitely done something wrong - possibly having corrupted in data. So a panic seems apropriate. It isn't clear to me what useful message you could print to help diganose the problem. Neither the address, nor the contents of the mbuf would be that useful. A stack trace would probably be useful - but a kernel dump would definitely be. Maybe I've missed something, but... David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message