On 9/2/21 2:53 PM, Andrew Morton wrote:
...
--- a/mm/gup.c~mm-gup-remove-try_get_page-call-try_get_compound_head-directly
+++ a/mm/gup.c
@@ -62,11 +62,24 @@ static void put_page_refs(struct page *p
put_page(page);
}
-/*
- * Return the compound head page with ref appropriately incremented,
- * or NULL if that failed.
+/**
+ * try_get_compound_head() - return the compound head page with refcount
+ * appropriately incremented, or NULL if that failed.
+ *
+ * This handles potential refcount overflow correctly. It also works correclty
s/correclty/correctly/
...that is, if it is reasonable to do a typo fixup at this stage in the cycle.
thanks,
--
John Hubbard
NVIDIA