Fix a race condition where a mutex was destroyed while sleeping on it.

Found while analyzing a report from julian. It might fix his bug.
Approved by: rrs (mentor)
MFC after: 3 days
This commit is contained in:
Michael Tuexen 2009-10-11 12:23:56 +00:00
parent 82cf92d483
commit f71e78a1d9
2 changed files with 1 additions and 1 deletions

View File

@ -97,6 +97,7 @@ sctp_iterator_thread(void *v)
&SCTP_BASE_INFO(ipi_iterator_wq_mtx),
0, "waiting_for_work", 0);
if (SCTP_BASE_INFO(threads_must_exit)) {
SCTP_IPI_ITERATOR_WQ_DESTROY();
kthread_exit();
}
sctp_iterator_worker();

View File

@ -5616,7 +5616,6 @@ sctp_pcb_finish(void)
SCTP_IP_PKTLOG_DESTROY();
#endif
SCTP_IPI_ITERATOR_WQ_DESTROY();
SCTP_IPI_ADDR_DESTROY();
SCTP_ITERATOR_LOCK_DESTROY();
SCTP_STATLOG_DESTROY();