From owner-freebsd-hackers Tue Jun 27 17:20:41 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail-relay.eunet.no (mail-relay.eunet.no [193.71.71.242]) by hub.freebsd.org (Postfix) with ESMTP id E309737BF9B for ; Tue, 27 Jun 2000 17:20:22 -0700 (PDT) (envelope-from mbendiks@eunet.no) Received: from login-1.eunet.no (login-1.eunet.no [193.75.110.2]) by mail-relay.eunet.no (8.9.3/8.9.3/GN) with ESMTP id CAA37530 for ; Wed, 28 Jun 2000 02:20:18 +0200 (CEST) (envelope-from mbendiks@eunet.no) Received: from localhost (mbendiks@localhost) by login-1.eunet.no (8.9.3/8.8.8) with ESMTP id CAA14290 for ; Wed, 28 Jun 2000 02:20:17 +0200 (CEST) (envelope-from mbendiks@eunet.no) X-Authentication-Warning: login-1.eunet.no: mbendiks owned process doing -bs Date: Wed, 28 Jun 2000 02:20:17 +0200 (CEST) From: Marius Bendiksen To: hackers@freebsd.org Subject: buffer cache question Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the following code, from /sys/kern/vfs_bio.c : bread(), it appears to me that it is possible for a null pointer to be deferenced? struct buf *bp; bp = getblk(vp, blkno, size, 0, 0); *bpp = bp; /* if not found in cache, do some I/O */ if ((bp->b_flags & B_CACHE) == 0) { It seems, from a very brief inspection of the code, as though getblk() might return a null pointer under certain circumstances. I'd expect my understanding of the code is flawed, as such a thing should have been discovered ages ago, were it a bug, but I feel I should ask. Marius To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message