libuuid: clear uuidd cache on fork()
authorThomas Weißschuh <thomas@t-8ch.de>
Tue, 7 May 2024 11:44:31 +0000 (13:44 +0200)
committerHelmut Grohne <helmut@subdivi.de>
Wed, 5 Jun 2024 15:23:00 +0000 (17:23 +0200)
commit75a0eb61649ab4f24492d5c3faa3b2b65f44e6df
treed37a4a93f5f5ae18653d4546fcc2a09152adbcea
parent2b168e64c4548ac42ce0a70a02b823b5cea68947
libuuid: clear uuidd cache on fork()

After fork() the memory of the calling thread is preserved into the new
process. This also includes TLS.
Make sure to reset the cache after a fork to avoid reuse of cached
values.

Only the TLS of the thread calling fork() is relevant as that is the
only thread that gets forked.
New threads will received newly initialized TLS.

Fixes https://github.com/util-linux/util-linux/issues/3009
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Gbp-Pq: Topic upstream-master
Gbp-Pq: Name libuuid-clear-uuidd-cache-on-fork.patch
libuuid/src/Makemodule.am
libuuid/src/gen_uuid.c