Hi there,
I have a question about the condition of wait_event_interruptible() in
crypto_proc().
The condition in 2009-09-01 release is:
10507 + wait_event_interruptible(cryptoproc_wait,
10508 + !(list_empty(&crp_q) || crypto_all_qblocked) ||
10509 + !(list_empty(&crp_kq) || crypto_all_kqblocked) ||
10510 + cryptoproc == (pid_t) -1);
crypto_all_qblocked is a global integer which has the value of
!list_empty(&crp_q). It would not be modified during the sleeping period of
crypto_proc(). If crypto_all_qblocked is true (e.g. crp_q is not empty but
no driver is available) and no more operations go into crypto_dispatch(),
the condition will be always false. Who can awake crypto_proc() kernel
thread in this case?
- ccwu
|