Hi,

On Tue, May 10, 2022 at 12:57:20AM +0200, Mark Wielaard wrote:
> debuginfod-client would try to create the cache config files twice,
> once through debuginfod_init_cache, which was always called before the
> debuginfod_clean_cache check. Which called debuginfod_config_cache
> which also tried to create the config files when they didn't exist
> yet. debuginfod_config_cache however had a small bug that meant it
> would not provide a valid struct stat if the config file didn't exist
> yet. The first patch fixes that:
> 
> [PATCH 1/3] debuginfod: Make sure debuginfod_config_cache always returns 
> valid stat
> 
> Then the second patch removes debuginfod_init_cache which saves two
> stat calls (but introduces a new mkdir call).
> 
> [PATCH 2/3] debuginfod: Remove debuginfod_init_cache
> 
> Finally as soon as debuginfod_clean_cache commits to clean the cache
> dir we immediately update the mtime of the interval config file so
> other threads will not try to simultaniously also try to clean up the
> cache dir. Because that is just duplicate work.
> 
> [PATCH 3/3] debuginfod: update mtime of interval_path as early as possible

Frank said off-list that he didn't see anything wrong with these
patches. So I pushed thse 3 patches.

12 points!

Mark

Reply via email to