Author: pfg
Date: Fri Mar 25 01:01:32 2016
New Revision: 297263
URL: https://svnweb.freebsd.org/changeset/base/297263

Log:
  MFC r297037:
  aio_qphysio(): Avoid uninitialized pointer read on error.
  
  For the !unmap case it may happen that pbuf gets called unreferenced
  when vm_fault_quick_hold_pages() fails.
  Initialize it so it doesn't cause trouble.
  
  CID:          1352776
  Reviewed by:  jhb

Modified:
  stable/10/sys/kern/vfs_aio.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/vfs_aio.c
==============================================================================
--- stable/10/sys/kern/vfs_aio.c        Fri Mar 25 00:58:34 2016        
(r297262)
+++ stable/10/sys/kern/vfs_aio.c        Fri Mar 25 01:01:32 2016        
(r297263)
@@ -1355,7 +1355,8 @@ aio_qphysio(struct proc *p, struct aiocb
        if (!unmap) {
                aiocbe->pbuf = pbuf = (struct buf *)getpbuf(NULL);
                BUF_KERNPROC(pbuf);
-       }
+       } else
+               pbuf = NULL;
 
        AIO_LOCK(ki);
        ki->kaio_count++;
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to