Re: [PATCH 1/4] locking/rwsem: Add missing ACQUIRE to read_slowpath exit when queue is empty

From: Andrea Parri
Date: Fri Jul 19 2019 - 04:50:07 EST


> @@ -1032,6 +1032,8 @@ rwsem_down_read_slowpath(struct rw_semap
> */
> if (adjustment && !(atomic_long_read(&sem->count) &
> (RWSEM_WRITER_MASK | RWSEM_FLAG_HANDOFF))) {
> + /* Provide lock ACQUIRE */
> + smp_acquire__after_ctrl_dep();

Does this also make the lock RCtso? Or maybe RCtso was already
guaranteed (and I'm failing to see why)?

Thanks,
Andrea