cvs commit: src/sys/vm vm_contig.c
Greg 'groggy' Lehey
grog at FreeBSD.org
Wed Nov 24 16:13:41 PST 2004
On Wednesday, 24 November 2004 at 18:56:13 +0000, Xin LI wrote:
> delphij 2004-11-24 18:56:13 UTC
>
> FreeBSD src repository
>
> Modified files:
> sys/vm vm_contig.c
> Log:
> Try to close a potential, but serious race in our VM subsystem.
>
> Historically, our contigmalloc1() and contigmalloc2() assumes
> that a page in PQ_CACHE can be unconditionally reused by busying
> and freeing it. Unfortunatelly, when object happens to be not
> NULL, the code will set m->object to NULL and disregard the fact
> that the page is actually in the VM page bucket, resulting in
> page bucket hash table corruption and finally, a filesystem
> corruption, or a 'page not in hash' panic.
>
> This commit has borrowed the idea taken from DragonFlyBSD's fix
> to the VM fix by Matthew Dillon[1]. This version of patch will
> do the following checks:
>
> - When scanning pages in PQ_CACHE, check hold_count and
> skip over pages that are held temporarily.
> - For pages in PQ_CACHE and selected as candidate of being
> freed, check if it is busy at that time.
>
> Note: It seems that this is might be unrelated to kern/72539.
Nice log message! Thanks.
Greg
--
See complete headers for address and phone numbers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20041125/6e2fb2be/attachment.bin
More information about the cvs-src
mailing list