Author: mmacy Date: Sat May 19 04:09:58 2018 New Revision: 333842 URL: https://svnweb.freebsd.org/changeset/base/333842
Log: physio: avoid uninitialized variables Modified: head/sys/kern/kern_physio.c Modified: head/sys/kern/kern_physio.c ============================================================================== --- head/sys/kern/kern_physio.c Sat May 19 04:08:11 2018 (r333841) +++ head/sys/kern/kern_physio.c Sat May 19 04:09:58 2018 (r333842) @@ -51,6 +51,8 @@ physio(struct cdev *dev, struct uio *uio, int ioflag) vm_prot_t prot; csw = dev->si_devsw; + npages = 0; + sa = NULL; /* check if character device is being destroyed */ if (csw == NULL) return (ENXIO); @@ -177,7 +179,7 @@ physio(struct cdev *dev, struct uio *uio, int ioflag) error = EFAULT; goto doerror; } - if (pbuf) { + if (pbuf && sa) { pmap_qenter((vm_offset_t)sa, pages, npages); bp->bio_data = sa + poff; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"