svn commit: r297037 - head/sys/kern
Pedro F. Giffuni
pfg at FreeBSD.org
Fri Mar 18 19:04:03 UTC 2016
Author: pfg
Date: Fri Mar 18 19:04:01 2016
New Revision: 297037
URL: https://svnweb.freebsd.org/changeset/base/297037
Log:
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
MFC after: 1 week
Modified:
head/sys/kern/vfs_aio.c
Modified: head/sys/kern/vfs_aio.c
==============================================================================
--- head/sys/kern/vfs_aio.c Fri Mar 18 18:26:07 2016 (r297036)
+++ head/sys/kern/vfs_aio.c Fri Mar 18 19:04:01 2016 (r297037)
@@ -1226,7 +1226,8 @@ aio_qphysio(struct proc *p, struct kaioc
if (!unmap) {
job->pbuf = pbuf = (struct buf *)getpbuf(NULL);
BUF_KERNPROC(pbuf);
- }
+ } else
+ pbuf = NULL;
AIO_LOCK(ki);
if (!unmap)
More information about the svn-src-all
mailing list