The exception occurs in TAILQ_INSERT_HEAD(&taskq->tasks, task, next),
more precisely, looking at the macro expansion, in
*(&taskq->tasks)->tqh_last = task.
So it looks like tqh_last is a NULL ptr which presumably means that
the list head has not been initialized yet.
Maybe usb_add_task() is called before usb_create_event_thread() (which
initializes usb_taskq[]). |