{"api_version":"1","generated_at":"2026-10-25T05:46:14+00:00","cve":"CVE-2026-23097","urls":{"html":"https://cve.report/CVE-2026-23097","api":"https://cve.report/api/cve/CVE-2026-23097.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-23097","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-23097"},"summary":{"title":"migrate: correct lock ordering for hugetlb file folios","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmigrate: correct lock ordering for hugetlb file folios\n\nSyzbot has found a deadlock (analyzed by Lance Yang):\n\n1) Task (5749): Holds folio_lock, then tries to acquire i_mmap_rwsem(read lock).\n2) Task (5754): Holds i_mmap_rwsem(write lock), then tries to acquire\nfolio_lock.\n\nmigrate_pages()\n  -> migrate_hugetlbs()\n    -> unmap_and_move_huge_page()     <- Takes folio_lock!\n      -> remove_migration_ptes()\n        -> __rmap_walk_file()\n          -> i_mmap_lock_read()       <- Waits for i_mmap_rwsem(read lock)!\n\nhugetlbfs_fallocate()\n  -> hugetlbfs_punch_hole()           <- Takes i_mmap_rwsem(write lock)!\n    -> hugetlbfs_zero_partial_page()\n     -> filemap_lock_hugetlb_folio()\n      -> filemap_lock_folio()\n        -> __filemap_get_folio        <- Waits for folio_lock!\n\nThe migration path is the one taking locks in the wrong order according to\nthe documentation at the top of mm/rmap.c.  So expand the scope of the\nexisting i_mmap_lock to cover the calls to remove_migration_ptes() too.\n\nThis is (mostly) how it used to be after commit c0d0381ade79.  That was\nremoved by 336bf30eb765 for both file & anon hugetlb pages when it should\nonly have been removed for anon hugetlb pages.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-02-04 17:16:20","updated_at":"2026-10-19 19:17:36"},"problem_types":["NVD-CWE-noinfo","CWE-362","CWE-362 CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')"],"metrics":[{"version":"3.1","source":"nvd@nist.gov","type":"Primary","score":"5.5","severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":5.5,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"}}],"references":[{"url":"https://git.kernel.org/stable/c/e7396d23f9d5739f56cf9ab430c3a169f5508394","name":"https://git.kernel.org/stable/c/e7396d23f9d5739f56cf9ab430c3a169f5508394","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5edb9854f8df5428b40990a1c7d60507da5bd330","name":"https://git.kernel.org/stable/c/5edb9854f8df5428b40990a1c7d60507da5bd330","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/b75070823b89009f5123fd0e05a8e0c3d39937c1","name":"https://git.kernel.org/stable/c/b75070823b89009f5123fd0e05a8e0c3d39937c1","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ad97b9a55246eb940a26ac977f80892a395cabf9","name":"https://git.kernel.org/stable/c/ad97b9a55246eb940a26ac977f80892a395cabf9","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/b7880cb166ab62c2409046b2347261abf701530e","name":"https://git.kernel.org/stable/c/b7880cb166ab62c2409046b2347261abf701530e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1b68efce6dd483d22f50d0d3800c4cfda14b1305","name":"https://git.kernel.org/stable/c/1b68efce6dd483d22f50d0d3800c4cfda14b1305","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/526394af4e8ade89cacd1a9ce2b97712712fcc34","name":"https://git.kernel.org/stable/c/526394af4e8ade89cacd1a9ce2b97712712fcc34","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-23097","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23097","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 336bf30eb76580b579dc711ded5d599d905c0217 e7396d23f9d5739f56cf9ab430c3a169f5508394 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 336bf30eb76580b579dc711ded5d599d905c0217 ad97b9a55246eb940a26ac977f80892a395cabf9 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 336bf30eb76580b579dc711ded5d599d905c0217 5edb9854f8df5428b40990a1c7d60507da5bd330 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 336bf30eb76580b579dc711ded5d599d905c0217 526394af4e8ade89cacd1a9ce2b97712712fcc34 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 336bf30eb76580b579dc711ded5d599d905c0217 b75070823b89009f5123fd0e05a8e0c3d39937c1 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 336bf30eb76580b579dc711ded5d599d905c0217 1b68efce6dd483d22f50d0d3800c4cfda14b1305 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 336bf30eb76580b579dc711ded5d599d905c0217 b7880cb166ab62c2409046b2347261abf701530e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ef792d6ce0db6a56e56743b1de1716a982c3b851 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.9.9 5.10 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.10","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.249 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.199 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.162 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.122 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.68 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.8 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.19 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2026","cve_id":"23097","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"adp":[{"metrics":[{"other":{"content":{"id":"CVE-2026-23097","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","timestamp":"2026-06-10T20:41:33.152666Z","version":"2.0.3"},"type":"ssvc"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-362","description":"CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-10-19T18:25:30.652Z","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP"},"title":"CISA ADP Vulnrichment"}],"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["mm/migrate.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"e7396d23f9d5739f56cf9ab430c3a169f5508394","status":"affected","version":"336bf30eb76580b579dc711ded5d599d905c0217","versionType":"git"},{"lessThan":"ad97b9a55246eb940a26ac977f80892a395cabf9","status":"affected","version":"336bf30eb76580b579dc711ded5d599d905c0217","versionType":"git"},{"lessThan":"5edb9854f8df5428b40990a1c7d60507da5bd330","status":"affected","version":"336bf30eb76580b579dc711ded5d599d905c0217","versionType":"git"},{"lessThan":"526394af4e8ade89cacd1a9ce2b97712712fcc34","status":"affected","version":"336bf30eb76580b579dc711ded5d599d905c0217","versionType":"git"},{"lessThan":"b75070823b89009f5123fd0e05a8e0c3d39937c1","status":"affected","version":"336bf30eb76580b579dc711ded5d599d905c0217","versionType":"git"},{"lessThan":"1b68efce6dd483d22f50d0d3800c4cfda14b1305","status":"affected","version":"336bf30eb76580b579dc711ded5d599d905c0217","versionType":"git"},{"lessThan":"b7880cb166ab62c2409046b2347261abf701530e","status":"affected","version":"336bf30eb76580b579dc711ded5d599d905c0217","versionType":"git"},{"status":"affected","version":"ef792d6ce0db6a56e56743b1de1716a982c3b851","versionType":"git"},{"lessThan":"5.10","status":"affected","version":"5.9.9","versionType":"semver"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["mm/migrate.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.10"},{"lessThan":"5.10","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.249","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.199","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.162","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.122","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.68","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.8","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"6.19","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.249","versionStartIncluding":"5.10","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.199","versionStartIncluding":"5.10","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.162","versionStartIncluding":"5.10","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.122","versionStartIncluding":"5.10","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.68","versionStartIncluding":"5.10","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.8","versionStartIncluding":"5.10","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.19","versionStartIncluding":"5.10","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9.9","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmigrate: correct lock ordering for hugetlb file folios\n\nSyzbot has found a deadlock (analyzed by Lance Yang):\n\n1) Task (5749): Holds folio_lock, then tries to acquire i_mmap_rwsem(read lock).\n2) Task (5754): Holds i_mmap_rwsem(write lock), then tries to acquire\nfolio_lock.\n\nmigrate_pages()\n  -> migrate_hugetlbs()\n    -> unmap_and_move_huge_page()     <- Takes folio_lock!\n      -> remove_migration_ptes()\n        -> __rmap_walk_file()\n          -> i_mmap_lock_read()       <- Waits for i_mmap_rwsem(read lock)!\n\nhugetlbfs_fallocate()\n  -> hugetlbfs_punch_hole()           <- Takes i_mmap_rwsem(write lock)!\n    -> hugetlbfs_zero_partial_page()\n     -> filemap_lock_hugetlb_folio()\n      -> filemap_lock_folio()\n        -> __filemap_get_folio        <- Waits for folio_lock!\n\nThe migration path is the one taking locks in the wrong order according to\nthe documentation at the top of mm/rmap.c.  So expand the scope of the\nexisting i_mmap_lock to cover the calls to remove_migration_ptes() too.\n\nThis is (mostly) how it used to be after commit c0d0381ade79.  That was\nremoved by 336bf30eb765 for both file & anon hugetlb pages when it should\nonly have been removed for anon hugetlb pages."}],"providerMetadata":{"dateUpdated":"2026-05-23T16:03:50.508Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/e7396d23f9d5739f56cf9ab430c3a169f5508394"},{"url":"https://git.kernel.org/stable/c/ad97b9a55246eb940a26ac977f80892a395cabf9"},{"url":"https://git.kernel.org/stable/c/5edb9854f8df5428b40990a1c7d60507da5bd330"},{"url":"https://git.kernel.org/stable/c/526394af4e8ade89cacd1a9ce2b97712712fcc34"},{"url":"https://git.kernel.org/stable/c/b75070823b89009f5123fd0e05a8e0c3d39937c1"},{"url":"https://git.kernel.org/stable/c/1b68efce6dd483d22f50d0d3800c4cfda14b1305"},{"url":"https://git.kernel.org/stable/c/b7880cb166ab62c2409046b2347261abf701530e"}],"title":"migrate: correct lock ordering for hugetlb file folios","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-23097","datePublished":"2026-02-04T16:08:19.815Z","dateReserved":"2026-01-13T15:37:45.964Z","dateUpdated":"2026-10-19T18:25:30.652Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-02-04 17:16:20","lastModifiedDate":"2026-10-19 19:17:36","problem_types":["NVD-CWE-noinfo","CWE-362","CWE-362 CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')"],"metrics":{"cvssMetricV31":[{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":5.5,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":3.6}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-06-10T20:41:33.152666Z","id":"CVE-2026-23097","options":[{"exploitation":"none"},{"automatable":"no"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9.9","versionEndExcluding":"5.10","matchCriteriaId":"9598C575-CE16-4F2B-A517-667AA54B4B86"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10.1","versionEndExcluding":"5.10.249","matchCriteriaId":"FE8CC3D1-1602-4F1D-A05B-F0E1722A86DD"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.15.199","matchCriteriaId":"A247FBA6-BEB9-484F-B892-DD5517949CCD"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.1.162","matchCriteriaId":"6579E0D4-0641-479D-A4C3-0EF618798C55"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"6.6.122","matchCriteriaId":"8EAAE395-0162-4BAF-9AD5-E9AF3C869C4F"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.12.68","matchCriteriaId":"52F38E19-0FDD-4992-9D6D-D4169D689598"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13","versionEndExcluding":"6.18.8","matchCriteriaId":"E65C6E79-7EBE-4C77-93F0-818CF5B38F4E"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.10:-:*:*:*:*:*:*","matchCriteriaId":"B29EBB93-107F-4ED6-8DE3-C2732BC659C3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.10:rc4:*:*:*:*:*:*","matchCriteriaId":"0CD159FA-170F-4389-9085-CACCF97ABB1E"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.10:rc5:*:*:*:*:*:*","matchCriteriaId":"F0390D83-6C17-4557-BE8D-B659E04F565A"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.10:rc6:*:*:*:*:*:*","matchCriteriaId":"4120E4B3-B66D-4ACE-8570-1DD4DF20A324"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.10:rc7:*:*:*:*:*:*","matchCriteriaId":"73D60343-647D-4B5D-AA6D-CE87C462E368"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*","matchCriteriaId":"17B67AA7-40D6-4AFA-8459-F200F3D7CFD1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*","matchCriteriaId":"C47E4CC9-C826-4FA9-B014-7FE3D9B318B2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*","matchCriteriaId":"F71D92C0-C023-48BD-B3B6-70B638EEE298"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*","matchCriteriaId":"13580667-0A98-40CC-B29F-D12790B91BDB"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.19:rc5:*:*:*:*:*:*","matchCriteriaId":"CAD1FED7-CF48-47BF-AC7D-7B6FA3C065FC"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.19:rc6:*:*:*:*:*:*","matchCriteriaId":"3EF854A1-ABB1-4E93-BE9A-44569EC76C0D"}]}]}]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"23097","Ordinal":"1","Title":"migrate: correct lock ordering for hugetlb file folios","CVE":"CVE-2026-23097","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"23097","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nmigrate: correct lock ordering for hugetlb file folios\n\nSyzbot has found a deadlock (analyzed by Lance Yang):\n\n1) Task (5749): Holds folio_lock, then tries to acquire i_mmap_rwsem(read lock).\n2) Task (5754): Holds i_mmap_rwsem(write lock), then tries to acquire\nfolio_lock.\n\nmigrate_pages()\n  -> migrate_hugetlbs()\n    -> unmap_and_move_huge_page()     <- Takes folio_lock!\n      -> remove_migration_ptes()\n        -> __rmap_walk_file()\n          -> i_mmap_lock_read()       <- Waits for i_mmap_rwsem(read lock)!\n\nhugetlbfs_fallocate()\n  -> hugetlbfs_punch_hole()           <- Takes i_mmap_rwsem(write lock)!\n    -> hugetlbfs_zero_partial_page()\n     -> filemap_lock_hugetlb_folio()\n      -> filemap_lock_folio()\n        -> __filemap_get_folio        <- Waits for folio_lock!\n\nThe migration path is the one taking locks in the wrong order according to\nthe documentation at the top of mm/rmap.c.  So expand the scope of the\nexisting i_mmap_lock to cover the calls to remove_migration_ptes() too.\n\nThis is (mostly) how it used to be after commit c0d0381ade79.  That was\nremoved by 336bf30eb765 for both file & anon hugetlb pages when it should\nonly have been removed for anon hugetlb pages.","Type":"Description","Title":"migrate: correct lock ordering for hugetlb file folios"}]}}}