Initialize paddr to handle the case of zero size.
Reported and reviewed by: Conrad Meyer <cemeyer@uw.edu> MFC after: 1 week
This commit is contained in:
parent
031925742a
commit
7253a5ec63
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=263095
@ -414,6 +414,7 @@ old_dev_pager_ctor(void *handle, vm_ooffset_t size, vm_prot_t prot,
|
||||
* XXX assumes VM_PROT_* == PROT_*
|
||||
*/
|
||||
npages = OFF_TO_IDX(size);
|
||||
paddr = 0; /* Make paddr initialized for the case of size == 0. */
|
||||
for (off = foff; npages--; off += PAGE_SIZE) {
|
||||
if (csw->d_mmap(dev, off, &paddr, (int)prot, &dummy) != 0) {
|
||||
dev_relthread(dev, ref);
|
||||
|
Loading…
Reference in New Issue
Block a user