Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Dec 1995 07:58:18 +0100 (MET)
From:      aagero@aage.aage.priv.no
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/901: busy pages get free'd by vm_page_free
Message-ID:  <199512180658.HAA12860@birk04.studby.uio.no>
Resent-Message-ID: <199512180700.XAA07630@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         901
>Category:       kern
>Synopsis:       vm_page_free frees wrong pages in vfs_bio.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 17 23:00:01 PST 1995
>Last-Modified:
>Originator:     Åge Røbekk
>Organization:
>Release:        FreeBSD 2.2-CURRENT i386
>Environment:

FreeBSD-CURRENT 14. dec. sources.

>Description:

vm_page_free() in vfs_bio.c has an incorrent index of the free(?) pages. When
vm_hold_free_pages() calls vm_page_free() it points to the wrong page due to
the index being a signed datatype.

>How-To-Repeat:

Do a lot of activity, in order to get the paging moving. Usually ls -lR / has
been sufficient.

>Fix:

Apply the included patch.
	
--- kern/vfs_bio.c      Sun Dec 17 02:51:17 1995
+++ kern/vfs_bio.c~     Sun Dec 17 02:51:04 1995
@@ -1634,7 +1634,7 @@
        vm_offset_t to = round_page(toa);
 
        for (pg = from; pg < to; pg += PAGE_SIZE) {
-               int index = ((caddr_t) pg - bp->b_data) >> PAGE_SHIFT;
+               unsigned int index = ((caddr_t) pg - bp->b_data) >> PAGE_SHIFT;
                p = bp->b_pages[index];
                bp->b_pages[index] = 0;
                pmap_kremove(pg);

>Audit-Trail:
>Unformatted:



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