Prakash-Surya/spl — comment on commit 890756cda87d7bfbcabc57b63489764ff7aa887b
File: module/spl/spl-taskq.c line 315
By behlendorf:

The locking in this function is wrong. The t->t_lock is there to protect the contents of the the taskq_ent_t, the tq->tq_lock protects the taskq struct from additions/deletions to the priority and pending lists. You must take the tq->tq_lock like in taskq_dispatch to prevent list corruption. The t->t_lock however is more optional, I would still take it because there basically zero chance of contention so it's virtually free and it does add a level of safety.