locking: Fix race condition in LockSet
authorMichael Hanselmann <hansmi@google.com>
Wed, 13 Jan 2010 10:10:17 +0000 (11:10 +0100)
committerMichael Hanselmann <hansmi@google.com>
Wed, 13 Jan 2010 13:02:49 +0000 (14:02 +0100)
commit71e1863e7634994cc1fdc292929a002957a89fbd
treec06db11c853f38e79fa2819747ab310aefb68ecf
parent4776e022c51780a6c7e26b7506b4e7c2da293d9f
locking: Fix race condition in LockSet

This patch fixes a race condition when acquiring all locks in
a LockSet instance. The list of lock names needs to be sorted
to guarantee a consistent locking order, but the names were not
sorted when acquiring all locks in the set.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/locking.py