]> git.ipfire.org Git - thirdparty/systemd.git/commit
hashmap: make sure to initialize shared hash key atomically
authorLennart Poettering <lennart@poettering.net>
Fri, 11 Sep 2020 22:09:07 +0000 (00:09 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 12 Sep 2020 07:33:33 +0000 (09:33 +0200)
commitae0b700a856c0ae460d271bb50dccfaae84dbcab
treef032133f09633a40a3499cf10d04e7eb235b5679
parent35b4e3c1bc7d4001244ff3986c084152c8901d03
hashmap: make sure to initialize shared hash key atomically

if we allocate a bunch of hash tables all at the same time, with none
earlier than the other, there's a good chance we'll initialize the
shared hash key multiple times, so that some threads will see a
different shared hash key than others.

Let's fix that, and make sure really everyone sees the same hash key.

Fixes: #17007
src/basic/hashmap.c