Commit 39baf103 authored by Parav Pandit's avatar Parav Pandit Committed by Doug Ledford
Browse files

IB/core: Fix use workqueue without WQ_MEM_RECLAIM

The IB/core provides address resolution service and invokes callback
handler when address resolve request completes of requester in worker
thread context.

Such caller might allocate or free memory in callback handler
depending on the completion status to make further progress or to
terminate a connection. Most ULPs resolve route which involves
allocating route entry and path record elements in callback event handler.

It has been noticed that WQ_MEM_RECLAIM flag should not be used for
workers that tend to allocate memory in this [1] thread discussion.

In order to mitigate this situation, WQ_MEM_RECLAIM flag was dropped for
other such WQs in this [2] patch.

Similar problem might arise with address resolution path, though its not
yet noticed. The ib_addr workqueue is not memory reclaim path due to its
nature of invoking callback that might allocate memory or don't free any
memory under memory pressure.


Fixes: f5481626 ("IB/addr: Remove deprecated create_singlethread_workqueue")
Fixes: 5fff41e1

 ("IB/core: Fix race condition in resolving IP to MAC")
Signed-off-by: default avatarParav Pandit <>
Reviewed-by: default avatarDaniel Jurgens <>
Signed-off-by: default avatarLeon Romanovsky <>
Signed-off-by: default avatarDoug Ledford <>
parent 79c4d80b
......@@ -852,7 +852,7 @@ static struct notifier_block nb = {
int addr_init(void)
addr_wq = alloc_ordered_workqueue("ib_addr", WQ_MEM_RECLAIM);
addr_wq = alloc_ordered_workqueue("ib_addr", 0);
if (!addr_wq)
return -ENOMEM;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment