On Sat Oct 31, 2026 at 10:13 PM EDT, Gregory Price (Meta) wrote: > From: Josef Bacik <[email protected]> > > should_reclaim_retry() walks a zonelist and passes the zoneref pointer > to the reclaim_retry_zone tracepoint, which loads the zone from the > entry again to find the node. > > Memory hotplug rebuilds the zonelists in place while allocations are > under way. When a zone in front of the zoneref entry has become empty, > the entries move up, and this one can be the end marker by the time the > tracepoint looks at it. zonelist_node_idx() then dereferences a NULL > zone. Short of that, the event can name another zone than the one its > numbers belong to. > > Pass the zone pointer instead of the zoneref pointer. > > Fixes: d379f01de095 ("oom, trace: add oom detection tracepoints") > Cc: <[email protected]> > Assisted-by: LLM > Signed-off-by: Josef Bacik <[email protected]> > Signed-off-by: David Hildenbrand (Arm) <[email protected]> > Signed-off-by: Vlastimil Babka (SUSE) <[email protected]> > Signed-off-by: Gregory Price (Meta) <[email protected]> > --- > include/trace/events/oom.h | 8 ++++---- > mm/page_alloc.c | 2 +- > 2 files changed, 5 insertions(+), 5 deletions(-) >
Makes sense. Reviewed-by: Zi Yan <[email protected]> -- Best Regards, Yan, Zi
