[PATCH] docs/RCU: Add the missing rcu_read_unlock()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We should exit the RCU read-side critical section before re-entering.

Signed-off-by: Alan Huang <mmpgouride@xxxxxxxxx>
---
 Documentation/RCU/rculist_nulls.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/RCU/rculist_nulls.rst b/Documentation/RCU/rculist_nulls.rst
index 9a734bf54..4370ac864 100644
--- a/Documentation/RCU/rculist_nulls.rst
+++ b/Documentation/RCU/rculist_nulls.rst
@@ -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
-- 
2.34.1




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux