]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Address problems in blist_alloc introduced in r349777. The swap block allocator...
authordougm <dougm@FreeBSD.org>
Thu, 11 Jul 2019 20:52:39 +0000 (20:52 +0000)
committerdougm <dougm@FreeBSD.org>
Thu, 11 Jul 2019 20:52:39 +0000 (20:52 +0000)
commita9f5b306a62e41ef5af8989e21069e5a84090100
treeba23e2c45dceda6f0715bf8cc44ddaaee0bbf501
parent6186c641dec84c67010cbf21a27b583dffca7628
Address problems in blist_alloc introduced in r349777.  The swap block allocator could become corrupted
if a retry to allocate swap space, after a larger allocation attempt failed, allocated a smaller set of free blocks
that ended on a 32- or 64-block boundary.

Add tests to detect this kind of failure-to-extend-at-boundary and prevent the associated accounting screwup.

Reported by: pho
Tested by: pho
Reviewed by: alc
Approved by: markj (mentor)
Discussed with: kib
Differential Revision: https://reviews.freebsd.org/D20893
sys/kern/subr_blist.c