aio: safeguard ioctx

This commit is contained in:
Thomas Schoebel-Theuer 2015-03-20 10:04:00 +01:00
parent a12450d891
commit 77714f374e
1 changed files with 5 additions and 0 deletions

View File

@ -635,6 +635,11 @@ static int aio_event_thread(void *data)
.tv_sec = 1, .tv_sec = 1,
}; };
if (unlikely(!(void*)output->ctxp)) {
MARS_ERR("Oops, context vanished. queued_sum = %d\n", atomic_read(&tinfo->queued_sum));
break;
}
oldfs = get_fs(); oldfs = get_fs();
set_fs(get_ds()); set_fs(get_ds());
/* TODO: don't timeout upon termination. /* TODO: don't timeout upon termination.