summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_pf.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2010-12-01 03:35:19 +0000
committeralc <alc@FreeBSD.org>2010-12-01 03:35:19 +0000
commit9ebc09a72f97f4d9120b8386a7ecb5cc107be5e5 (patch)
tree7b50d41d49e40321a7bb604e3613a5527afb664c /sys/dev/usb/usb_pf.c
parentbc2682b97b76f566f657795f57da6991d671a208 (diff)
downloadFreeBSD-src-9ebc09a72f97f4d9120b8386a7ecb5cc107be5e5.zip
FreeBSD-src-9ebc09a72f97f4d9120b8386a7ecb5cc107be5e5.tar.gz
Correct an error in the allocation of the vm_page_dump array in
vm_page_startup(). Specifically, the dump_avail array should be used instead of the phys_avail array to calculate the size of vm_page_dump. For example, the pages for the message buffer are allocated prior to vm_page_startup() by subtracting them from the last entry in the phys_avail array, but the first thing that vm_page_startup() does after creating the vm_page_dump array is to set the bits corresponding to the message buffer pages in that array. However, these bits might not actually exist in the array, because the size of the array is determined by the current value in the last entry of the phys_avail array. In general, the only reason why this doesn't always result in an out-of-bounds array access is that the size of the vm_page_dump array is rounded up to the next page boundary. This change eliminates that dependence on rounding (and luck). MFC after: 6 weeks
Diffstat (limited to 'sys/dev/usb/usb_pf.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud