From owner-cvs-all Mon Jun 21 18:40: 7 1999 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 682BE14D59; Mon, 21 Jun 1999 18:39:58 -0700 (PDT) (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id SAA39500; Mon, 21 Jun 1999 18:39:58 -0700 (PDT) (envelope-from mckusick@FreeBSD.org) Message-Id: <199906220139.SAA39500@freefall.freebsd.org> From: Kirk McKusick Date: Mon, 21 Jun 1999 18:39:58 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern vfs_bio.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk mckusick 1999/06/21 18:39:57 PDT Modified files: sys/kern vfs_bio.c Log: When allocating new buffers in getnewbuf, there are several points at which we may sleep. So, after completing our buffer allocation we must ensure that another process has not come along and allocated a different buffer with the same identity. We do this by keeping a global counter of the number of buffers that getnewbuf has allocated. We save this count when we enter getnewbuf and check it when we are about to return. If it has changed, then other buffers were allocated while we were in getnewbuf, so we must return NULL to let our parent know that it must recheck to see if it still needs the new buffer. Hopefully this fix will eliminate the creation of duplicate buffers with the same identity and the obscure corruptions that they cause. Revision Changes Path 1.215 +40 -11 src/sys/kern/vfs_bio.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message