Author: kib
Date: Wed Mar 19 13:09:38 2014
New Revision: 263361
URL: http://svnweb.freebsd.org/changeset/base/263361

Log:
  MFC r263095:
  Initialize paddr to handle the case of zero size.

Modified:
  stable/9/sys/vm/device_pager.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/vm/device_pager.c
==============================================================================
--- stable/9/sys/vm/device_pager.c      Wed Mar 19 13:09:17 2014        
(r263360)
+++ stable/9/sys/vm/device_pager.c      Wed Mar 19 13:09:38 2014        
(r263361)
@@ -408,6 +408,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);
_______________________________________________
svn-src-stable-9@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"

Reply via email to