lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220329222612.1001586-1-void@manifault.com>
Date:   Tue, 29 Mar 2022 15:26:13 -0700
From:   David Vernet <void@...ifault.com>
To:     frederic@...nel.org, jiangshanlai@...il.com,
        joel@...lfernandes.org, josh@...htriplett.org,
        linux-kernel@...r.kernel.org, mathieu.desnoyers@...icios.com,
        paulmck@...nel.org, quic_neeraju@...cinc.com, rcu@...r.kernel.org,
        rostedt@...dmis.org
Subject: [PATCH] rcu_sync: Fix comment to properly reflect rcu_sync_exit() behavior

rcu_sync_enter() is an rcu_sync API used by updaters which forces RCU
readers (e.g. percpu-rwsem) to take a slow-path during an update. It does
this by setting the gp_state of the rcu_sync object to GP_ENTER (i.e. > 0).
In this state, readers will take a "slow path", such as having percpu-rwsem
readers wait on a semaphore rather than just incrementing a reader count.
When the updater has completed their work, they must invoke rcu_sync_exit()
to signal to readers that they may again take their fastpaths.

rcu_sync_enter() currently has a comment that stipulates that a later call
to rcu_sync_exit() (by an updater) will re-enable reader "slowpaths". This
patch corrects the comment to properly reflect that rcu_sync_exit()
re-enables reader fastpaths.

Signed-off-by: David Vernet <void@...ifault.com>
---
 kernel/rcu/sync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/sync.c b/kernel/rcu/sync.c
index 33d896d85902..5cefc702158f 100644
--- a/kernel/rcu/sync.c
+++ b/kernel/rcu/sync.c
@@ -111,7 +111,7 @@ static void rcu_sync_func(struct rcu_head *rhp)
  * a slowpath during the update.  After this function returns, all
  * subsequent calls to rcu_sync_is_idle() will return false, which
  * tells readers to stay off their fastpaths.  A later call to
- * rcu_sync_exit() re-enables reader slowpaths.
+ * rcu_sync_exit() re-enables reader fastpaths.
  *
  * When called in isolation, rcu_sync_enter() must wait for a grace
  * period, however, closely spaced calls to rcu_sync_enter() can
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ