[PATCH] mm/page_alloc: Fix race condition between build_all_zonelists and page allocation

Michal Hocko mhocko at suse.com
Wed Aug 24 03:10:11 PDT 2022


On Wed 24-08-22 10:49:01, Mel Gorman wrote:
> +static unsigned int zonelist_iter_begin(void)
> +{
> +	if (IS_ENABLED(CONFIG_MEMORY_HOTREMOVE))
> +		return 0;
> +
> +	return read_seqbegin(&zonelist_update_seq);
> +}
> +
> +static unsigned int check_retry_zonelist(unsigned int seq)
> +{
> +	if (IS_ENABLED(CONFIG_MEMORY_HOTREMOVE))
> +		return seq;
> +
> +	return read_seqretry(&zonelist_update_seq, seq);
> +}

these should be negated
-- 
Michal Hocko
SUSE Labs



More information about the linux-arm-kernel mailing list