g_lock_trylock() always increments the counter 'i', even after cleaning a stale entry at position 'i', which means it will skip checking for a conflict against the new entry at position 'i'. As result more than one process could assume it holds an exclusive lock.
Created attachment 13881 [details] Backport for v4-7-test
Created attachment 13882 [details] Backport for v4-6-test
Created attachment 13883 [details] Backport for v4-7-test Compiles now...
Created attachment 13884 [details] Backport for v4-6-test
Re-assigning to Karolin for inclusion in 4.7.next, 4.6.next.
(In reply to Jeremy Allison from comment #5) Pushed to v4-7-test and autobuild-v4-6-test.
Pushed to both branches. Closing out bug report. Thanks!
Created attachment 14421 [details] Patch for 4.7 4.7 is not fully right yet, upgrades are not covered properly. 4.8 and 4.9 are not affected.
Comment on attachment 14421 [details] Patch for 4.7 Karolin, please add my review to patches 2 and 3.
(In reply to Stefan Metzmacher from comment #9) Pushed to autobuild-v4-7-test after adding (reviewed-by tags).
(In reply to Karolin Seeger from comment #10) Pushed to v4-7-test. Closing out bug report. Thanks!