In the Linux kernel, the following vulnerability has been resolved: mm/gup: fix memfdpinfolios alloc race panic If memfdpinfolios tries to create a hugetlb page, but someone else already did, then folio gets the value -EEXIST here: folio = memfdallocfolio(memfd, startidx); if (ISERR(folio)) { ret = PTRERR(folio); if (ret != -EEXIST) goto err; then on the next trip through the "while startidx" loop we panic here: if (folio) { folio_put(folio); To fix, set the folio to NULL on error.