1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-15 02:50:27 +03:00
Stefan Metzmacher f69814f035 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
(similar to commit 576fb4fb5dc506bf55e5cf87973999dca444149b)

Autobuild-User(v4-6-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-6-test): Fri Dec 22 22:11:00 CET 2017 on sn-devel-144
2017-12-22 22:11:00 +01:00
..
2015-03-17 11:30:52 +01:00
2016-08-24 01:33:50 +02:00
2017-04-21 13:59:21 +02:00
2016-07-28 05:00:18 +02:00
2015-11-06 13:43:45 +01:00
2015-10-13 01:23:07 +02:00
2014-09-18 20:36:11 +02:00
2016-02-23 22:03:16 +01:00
2014-11-25 07:25:44 +01:00
2016-02-23 22:03:16 +01:00
2016-02-23 22:03:16 +01:00
2015-05-06 04:14:14 +02:00
2015-02-13 23:32:07 +01:00
2016-02-23 22:03:16 +01:00
2015-03-17 11:30:52 +01:00
2012-07-18 15:54:20 -07:00
2016-05-04 01:28:23 +02:00
2016-04-15 15:32:11 +02:00
2012-05-15 18:24:10 +02:00
2016-12-28 20:17:12 +01:00
2015-11-06 13:43:45 +01:00
2016-01-10 22:24:17 +01:00
2016-01-10 22:24:17 +01:00
2016-12-28 20:17:13 +01:00