On Mon, May 02, 2016 at 03:14:34PM -0700, Bart Van Assche wrote: > I just noticed that ib_comp_wq is created as follows: > > ib_comp_wq = alloc_workqueue("ib-comp-wq", > WQ_UNBOUND | WQ_HIGHPRI | WQ_MEM_RECLAIM, > WQ_UNBOUND_MAX_ACTIVE); > > I think this breaks the locking guarantees for completion handlers. A quote > from Documentation/infiniband/core_locking.txt: "The driver must guarantee > that only one CQ event handler for a given CQ is running at a time." The > ib_srpt driver assumes that completion handler invocations are serialized > such that no locking is needed to access wait_list from inside a completion > handler. This should still be the case - the max_active argument to alloc_workqueue just specified the amount of work_structs that may be exectured on the workqueue concurrently, but each individual work_struct can only be excuted once at a time. See the following paragraph in Documentation/workqueue.txt: "Note that the flag WQ_NON_REENTRANT no longer exists as all workqueues are now non-reentrant - any work item is guaranteed to be executed by at most one worker system-wide at any given time." -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html