On Thu, Aug 8, 2024 at 1:21 PM Yosry Ahmed <yosryahmed@xxxxxxxxxx> wrote: > > On Thu, Aug 8, 2024 at 10:17 AM Yosry Ahmed <yosryahmed@xxxxxxxxxx> wrote: > > > > On Thu, Aug 8, 2024 at 8:42 AM Pasha Tatashin <pasha.tatashin@xxxxxxxxxx> wrote: > > > > > > It is more logical to update the stat before the page is freed, to avoid > > > use after free scenarios. > > > > > > Fixes: 15995a352474 ("mm: report per-page metadata information") > > > Signed-off-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx> > > > Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> > > > > Reviewed-by: Yosry Ahmed <yosryahmed@xxxxxxxxxx> > > Actually although I think this patch is correct, it shouldn't be > needed after patch 4 because we no longer use the page or pgdat to > update the stats. Good point, also there is a warning that pgdat is not used anymore. I will remove this patch from the series, and clean-up free_page_ext() by removing pgdat, once patches 3/4 and 4/4 are reviewed. Pasha Pasha