mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
mm/page_owner: preserve original free_pid/free_tgid during folio migration
__update_page_owner_free_handle() accepts pid and tgid, but ignores them, always storing current->pid and current->tgid. __folio_copy_owner() forwards the original free pid/tgid during folio migration, yet these values were overwritten by the migrating task. Store the passed-in pid/tgid so the migrated folio keeps the original free attribution. Link: https://lore.kernel.org/[email protected] Signed-off-by: Hongfu Li <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Acked-by: Vlastimil Babka (SUSE) <[email protected]> Cc: Brendan Jackman <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Cc: Zi Yan <[email protected]>
This commit is contained in:
+2
-2
@@ -307,8 +307,8 @@ static inline void __update_page_owner_free_handle(struct page *page,
|
||||
page_owner->free_handle = handle;
|
||||
}
|
||||
page_owner->free_ts_nsec = free_ts_nsec;
|
||||
page_owner->free_pid = current->pid;
|
||||
page_owner->free_tgid = current->tgid;
|
||||
page_owner->free_pid = pid;
|
||||
page_owner->free_tgid = tgid;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user