Message ID | a8e4ef3d79aba79bb844539af6d181a794011b1c.1721227179.git.bcodding@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] SUNRPC: Fix a race to wake a sync task | expand |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 6debf4fd42d4..cef623ea1506 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -369,8 +369,10 @@ static void rpc_make_runnable(struct workqueue_struct *wq, if (RPC_IS_ASYNC(task)) { INIT_WORK(&task->u.tk_work, rpc_async_schedule); queue_work(wq, &task->u.tk_work); - } else + } else { + smp_mb__after_atomic(); wake_up_bit(&task->tk_runstate, RPC_TASK_QUEUED); + } } /*