summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-08-11 04:09:14 +0000
committeralc <alc@FreeBSD.org>2002-08-11 04:09:14 +0000
commite22d8b78295e7f51c53975b39983ae5627b48ce1 (patch)
treec0399608fa8cf6d58b226b2dd8165fe61b7c8a3f
parent717dc062a83546fbafc136b6b0cb837e693598eb (diff)
downloadFreeBSD-src-e22d8b78295e7f51c53975b39983ae5627b48ce1.zip
FreeBSD-src-e22d8b78295e7f51c53975b39983ae5627b48ce1.tar.gz
o In aio_cancel(2), make sure that p->p_aioinfo isn't NULL before
dereferencing it. Submitted by: saureen <sshah@apple.com>
-rw-r--r--sys/kern/vfs_aio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index c46dd13..d296aca 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -1775,6 +1775,8 @@ aio_cancel(struct thread *td, struct aio_cancel_args *uap)
}
}
ki=p->p_aioinfo;
+ if (ki == NULL)
+ return (EINVAL);
s = splnet();
for (cbe = TAILQ_FIRST(&ki->kaio_jobqueue); cbe; cbe = cbn) {
OpenPOWER on IntegriCloud