Date: Fri, 25 Mar 2016 01:01:33 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r297263 - stable/10/sys/kern Message-ID: <201603250101.u2P11XOn022541@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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++;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603250101.u2P11XOn022541>