Il 15/05/2012 13:34, Kevin Wolf ha scritto: >> static void qemu_paio_submit(struct qemu_paiocb *aiocb) >> { >> + mutex_lock(&lock); >> aiocb->ret = -EINPROGRESS; >> aiocb->active = 0; >> - mutex_lock(&lock); >> if (idle_threads == 0 && cur_threads < max_threads) >> spawn_thread(); >> QTAILQ_INSERT_TAIL(&request_list, aiocb, node); >> mutex_unlock(&lock); >> cond_signal(&cond); >> } > > This is just silencing coverity, not really fixing a bug, right? aiocb > is inserted into request_lists only afterwards, and before it is in the > list, other threads can't find it.
Indeed... I don't like the patch, the access is out of the lock for a reason. Paolo