docs/RCU: Add the missing rcu_read_unlock()
Subsystems (2)
PATCH 1/1 docs/RCU: Add the missing rcu_read_unlock()
We should exit the RCU read-side critical section before re-entering.
Signed-off-by Alan Huang <[email protected]>
--- Documentation/RCU/rculist_nulls.rst | 1 + 1 file changed, 1 insertion(+)
Documentation/RCU/rculist_nulls.rst +1 -0
@@ -30,6 +30,7 @@ algorithms: obj = lockless_lookup(key); if (obj) { if (!try_get_ref(obj)) // might fail for free objects + rcu_read_unlock(); goto begin; /* * Because a writer could delete object, and a writer could
Signature · 1 line
2.34.1
Paul E. McKenney
maintainerQuoted 12 lines · Alan Huang
We should exit the RCU read-side critical section before re-entering.
Signed-off-by Alan Huang <[email protected]>--- Documentation/RCU/rculist_nulls.rst | 1 + 1 file changed, 1 insertion(+)Documentation/RCU/rculist_nulls.rst +0
-0
Documentation/RCU/rculist_nulls.rst algorithms: · line 33
Quoted 4 lines
Documentation/RCU/rculist_nulls.rst +1
-0@@ -30,6 +30,7 @@ algorithms: obj = lockless_lookup(key); if (obj) { if (!try_get_ref(obj)) // might fail for free objects + rcu_read_unlock();
Good eyes! But don't we also need a pair of braces?
Thanx, Paul
Quoted 6 lines
Documentation/RCU/rculist_nulls.rst +0
-0goto begin; /* * Because a writer could delete object, and a writer couldSignature · 1 line
2.34.1
Quoted 11 lines
2023年6月13日 05:26,Paul E. McKenney <[email protected]> 写道:
Quoted 7 lines · Alan Huang
We should exit the RCU read-side critical section before re-entering.
Signed-off-by Alan Huang <[email protected]>---
Documentation/RCU/rculist_nulls.rst| 1 +1 file changed, 1 insertion(+)
Quoted 11 lines
Documentation/RCU/rculist_nulls.rst algorithms: · line 33
Quoted 9 lines
Documentation/RCU/rculist_nulls.rst +1
-0@@ -30,6 +30,7 @@ algorithms: obj = lockless_lookup(key); if (obj) { if (!try_get_ref(obj)) // might fail for free objects + rcu_read_unlock();Good eyes! But don't we also need a pair of braces?
Yeah! We need that. I have sent the v2.
Thanks,
Alan
Quoted 8 lines
Thanx, Paul
Quoted 5 lines
Documentation/RCU/rculist_nulls.rst +0
-0goto begin; /* * Because a writer could delete object, and a writer couldSignature · 1 line
2.34.1