Re: [PATCH] mm: don't allow empty relative nodemask in mpol_relative_nodemask()
From: Matthew Wilcox
Date: Thu May 28 2026 - 15:42:10 EST
On Thu, May 28, 2026 at 03:03:37PM -0400, Yury Norov wrote:
> static void mpol_relative_nodemask(nodemask_t *ret, const nodemask_t *orig,
^^^^
> const nodemask_t *rel)
> {
> + unsigned int w = nodes_weight(*rel);
> nodemask_t tmp;
> - nodes_fold(tmp, *orig, nodes_weight(*rel));
> +
> + if (w == 0)
> + return -EINVAL;
... this doesn't even compile.