Author: kib Date: Wed Mar 12 16:38:55 2014 New Revision: 263095 URL: http://svnweb.freebsd.org/changeset/base/263095
Log: Initialize paddr to handle the case of zero size. Reported and reviewed by: Conrad Meyer <[email protected]> MFC after: 1 week Modified: head/sys/vm/device_pager.c Modified: head/sys/vm/device_pager.c ============================================================================== --- head/sys/vm/device_pager.c Wed Mar 12 15:30:40 2014 (r263094) +++ head/sys/vm/device_pager.c Wed Mar 12 16:38:55 2014 (r263095) @@ -414,6 +414,7 @@ old_dev_pager_ctor(void *handle, vm_ooff * 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); _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
