mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-26 16:18:31 +00:00
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
This commit is contained in:
parent
b011fce09f
commit
5166fdde7f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297037
@ -1226,7 +1226,8 @@ aio_qphysio(struct proc *p, struct kaiocb *job)
|
||||
if (!unmap) {
|
||||
job->pbuf = pbuf = (struct buf *)getpbuf(NULL);
|
||||
BUF_KERNPROC(pbuf);
|
||||
}
|
||||
} else
|
||||
pbuf = NULL;
|
||||
|
||||
AIO_LOCK(ki);
|
||||
if (!unmap)
|
||||
|
Loading…
Reference in New Issue
Block a user