diff options
| author | Gregory Price (Meta) <gourry@gourry.net> | 2026-10-31 22:13:40 -0400 |
|---|---|---|
| committer | Vlastimil Babka (SUSE) <vbabka@kernel.org> | 2026-11-05 10:58:52 +0100 |
| commit | 9b0c84dca162ff4b3804b84595873cf3e41cfe43 (patch) | |
| tree | 4223a263082d9b01aa190be0a78a1b0b48ebb929 /include/linux/workqueue_api.h | |
| parent | 4cc1bcdf2e4ebcd319005ce2ea132489f6155139 (diff) | |
mm/mmzone: remove zonelist_node_idx()
zonelist_node_idx() looks like it returns a field of the zoneref, as
zonelist_zone_idx() does, but it loads the zone from the slot again.
Memory hotplug rewrites zonelists in place, so a caller that has already
checked the slot can get a different zone, or the NULL terminator, from
that second load.
__next_zones_zonelist() and mempolicy_slab_node() had this bug.
Remove the helper and open-code it in its two remaining callers, neither
of which can race with a rebuild. local_memory_node() runs either inside
__build_all_zonelists() or during CPU bring-up, which holds
cpu_hotplug_lock for write and so excludes mem_hotplug_begin().
The lookup in mpol_misplaced() is unreachable: it needs a policy with
MPOL_F_MOF but not MPOL_F_MORON, and nothing sets one without the other.
Signed-off-by: Gregory Price (Meta) <gourry@gourry.net>
Link: https://patch.msgid.link/20261101021340.2251928-13-gourry@gourry.net
Reviewed-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Diffstat (limited to 'include/linux/workqueue_api.h')
0 files changed, 0 insertions, 0 deletions
