1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00
Stefan Metzmacher 576fb4fb5d g_lock: fix cleanup of stale entries in g_lock_trylock()
g_lock_trylock() always incremented the counter 'i', even after cleaning a stale
entry at position 'i', which means it skipped checking for a conflict against
the new entry at position 'i'.

As result a process could get a write lock, while there're still
some read lock holders. Once we get into that problem, also more than
one write lock are possible.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13195

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Dec 20 20:31:48 CET 2017 on sn-devel-144
2017-12-20 20:31:48 +01:00
..
2014-01-03 05:04:44 +01:00
2017-02-22 08:26:22 +01:00
2017-11-18 00:09:16 +01:00
2017-12-05 04:58:26 +01:00
2017-12-05 04:58:26 +01:00
2017-12-20 16:04:18 +01:00
2017-12-20 16:04:18 +01:00
2015-03-17 11:30:52 +01:00
2017-12-15 21:43:19 +01:00