diff options
author | zbb <zbb@FreeBSD.org> | 2015-08-10 17:16:49 +0000 |
---|---|---|
committer | zbb <zbb@FreeBSD.org> | 2015-08-10 17:16:49 +0000 |
commit | 141883cce0cea307fd0365430906181b1954df86 (patch) | |
tree | 644d72aaa547e50d1a9cfc7dcd57543483de4acf /sys/arm/xscale | |
parent | def7a72957eb2867c6c8ec96b2eef41d304e82ab (diff) | |
download | FreeBSD-src-141883cce0cea307fd0365430906181b1954df86.zip FreeBSD-src-141883cce0cea307fd0365430906181b1954df86.tar.gz |
Avoid sign extension of value passed to kva_alloc from uma_zone_reserve_kva
Fixes "panic: vm_radix_reserve_kva: unable to reserve KVA" caused by sign
extention of "pages * UMA_SLAB_SIZE" value passed to kva_alloc() which
takes unsigned long argument.
In the erroneus case that triggered this bug, the number of pages
to allocate in uma_zone_reserve_kva() was 0x8ebe6, that gave the
total number of bytes to allocate equal to 0x8ebe6000 (int).
This was then sign extended in kva_alloc() to 0xffffffff8ebe6000
(unsigned long).
Reviewed by: alc, kib
Submitted by: Zbigniew Bodek <zbb@semihalf.com>
Obtained from: Semihalf
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3346
Diffstat (limited to 'sys/arm/xscale')
0 files changed, 0 insertions, 0 deletions