Skip to content
Commit ad521763 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'rds-use-RCU-between-work-enqueue-and-connection-teardown'

Sowmini Varadhan says:

====================
rds: use RCU between work-enqueue and connection teardown

This patchset follows up on the root-cause mentioned in
https://www.spinics.net/lists/netdev/msg472849.html

Patch1 implements some code refactoring that was suggeseted
as an enhancement in http://patchwork.ozlabs.org/patch/843157/


It replaces the c_destroy_in_prog bit in rds_connection with
an atomically managed flag in rds_conn_path.

Patch2 builds on Patch1 and uses RCU to make sure that
work is only enqueued if the connection destroy is not already
in progress: the test-flag-and-enqueue is done under rcu_read_lock,
while destroy first sets the flag, uses synchronize_rcu to
wait for existing reader threads to complete, and then starts
all the work-cancellation.

Since I have not been able to reproduce the original stack traces
reported by syszbot, and these are fixes for a race condition that
are based on code-inspection I am not marking these as reported-by
at this time.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents eb9aa1bf 3db6e0d1
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