[dm-devel] [PATCH 17/32] libmultipath: fix tur checker double locking

Bart Van Assche Bart.VanAssche at wdc.com
Sun Aug 5 15:40:30 UTC 2018


On Wed, 2018-08-01 at 15:57 -0500, Benjamin Marzinski wrote:
> I realize that this locking was added to make an analyzer happy,
> presumably because sometimes ct->devt was being accessed while ct->devt
> was held, and sometimes not.  The tur checker locking will be cleaned
> up in a later patch to deal with this.

Are you perhaps referring to commit 873be9fef222 ("libmultipath/checkers/tur:
Serialize tur_checker_context.devt accesses")? Your assumption about how DRD
works is wrong. DRD doesn't care about which mutex or other synchronization
primitives are used to serialize accesses to data that is shared between
threads. All it cares about is that concurrent accesses to shared data are
serialized. I'm afraid that your patch reintroduces the race conditions that
were fixed by commit 873be9fef222. Have you considered to fix this without
removing the locking?

Bart.





More information about the dm-devel mailing list