{"api_version":"1","generated_at":"2026-08-06T02:59:06+00:00","cve":"CVE-2022-50517","urls":{"html":"https://cve.report/CVE-2022-50517","api":"https://cve.report/api/cve/CVE-2022-50517.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-50517","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-50517"},"summary":{"title":"mm/huge_memory: do not clobber swp_entry_t during THP split","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/huge_memory: do not clobber swp_entry_t during THP split\n\nThe following has been observed when running stressng mmap since commit\nb653db77350c (\"mm: Clear page->private when splitting or migrating a page\")\n\n   watchdog: BUG: soft lockup - CPU#75 stuck for 26s! [stress-ng:9546]\n   CPU: 75 PID: 9546 Comm: stress-ng Tainted: G            E      6.0.0-revert-b653db77-fix+ #29 0357d79b60fb09775f678e4f3f64ef0579ad1374\n   Hardware name: SGI.COM C2112-4GP3/X10DRT-P-Series, BIOS 2.0a 05/09/2016\n   RIP: 0010:xas_descend+0x28/0x80\n   Code: cc cc 0f b6 0e 48 8b 57 08 48 d3 ea 83 e2 3f 89 d0 48 83 c0 04 48 8b 44 c6 08 48 89 77 18 48 89 c1 83 e1 03 48 83 f9 02 75 08 <48> 3d fd 00 00 00 76 08 88 57 12 c3 cc cc cc cc 48 c1 e8 02 89 c2\n   RSP: 0018:ffffbbf02a2236a8 EFLAGS: 00000246\n   RAX: ffff9cab7d6a0002 RBX: ffffe04b0af88040 RCX: 0000000000000002\n   RDX: 0000000000000030 RSI: ffff9cab60509b60 RDI: ffffbbf02a2236c0\n   RBP: 0000000000000000 R08: ffff9cab60509b60 R09: ffffbbf02a2236c0\n   R10: 0000000000000001 R11: ffffbbf02a223698 R12: 0000000000000000\n   R13: ffff9cab4e28da80 R14: 0000000000039c01 R15: ffff9cab4e28da88\n   FS:  00007fab89b85e40(0000) GS:ffff9cea3fcc0000(0000) knlGS:0000000000000000\n   CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n   CR2: 00007fab84e00000 CR3: 00000040b73a4003 CR4: 00000000003706e0\n   DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n   DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n   Call Trace:\n    <TASK>\n    xas_load+0x3a/0x50\n    __filemap_get_folio+0x80/0x370\n    ? put_swap_page+0x163/0x360\n    pagecache_get_page+0x13/0x90\n    __try_to_reclaim_swap+0x50/0x190\n    scan_swap_map_slots+0x31e/0x670\n    get_swap_pages+0x226/0x3c0\n    folio_alloc_swap+0x1cc/0x240\n    add_to_swap+0x14/0x70\n    shrink_page_list+0x968/0xbc0\n    reclaim_page_list+0x70/0xf0\n    reclaim_pages+0xdd/0x120\n    madvise_cold_or_pageout_pte_range+0x814/0xf30\n    walk_pgd_range+0x637/0xa30\n    __walk_page_range+0x142/0x170\n    walk_page_range+0x146/0x170\n    madvise_pageout+0xb7/0x280\n    ? asm_common_interrupt+0x22/0x40\n    madvise_vma_behavior+0x3b7/0xac0\n    ? find_vma+0x4a/0x70\n    ? find_vma+0x64/0x70\n    ? madvise_vma_anon_name+0x40/0x40\n    madvise_walk_vmas+0xa6/0x130\n    do_madvise+0x2f4/0x360\n    __x64_sys_madvise+0x26/0x30\n    do_syscall_64+0x5b/0x80\n    ? do_syscall_64+0x67/0x80\n    ? syscall_exit_to_user_mode+0x17/0x40\n    ? do_syscall_64+0x67/0x80\n    ? syscall_exit_to_user_mode+0x17/0x40\n    ? do_syscall_64+0x67/0x80\n    ? do_syscall_64+0x67/0x80\n    ? common_interrupt+0x8b/0xa0\n    entry_SYSCALL_64_after_hwframe+0x63/0xcd\n\nThe problem can be reproduced with the mmtests config\nconfig-workload-stressng-mmap.  It does not always happen and when it\ntriggers is variable but it has happened on multiple machines.\n\nThe intent of commit b653db77350c patch was to avoid the case where\nPG_private is clear but folio->private is not-NULL.  However, THP tail\npages uses page->private for \"swp_entry_t if folio_test_swapcache()\" as\nstated in the documentation for struct folio.  This patch only clobbers\npage->private for tail pages if the head page was not in swapcache and\nwarns once if page->private had an unexpected value.","state":"PUBLISHED","assigner":"Linux","published_at":"2025-10-07 16:15:35","updated_at":"2026-08-04 10:18:18"},"problem_types":["NVD-CWE-noinfo"],"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"}},{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/71e2d666ef85d51834d658830f823560c402b8b6","name":"https://git.kernel.org/stable/c/71e2d666ef85d51834d658830f823560c402b8b6","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/8cace0eeb03d6043827faa6cf6c9067a9f05cd9f","name":"https://git.kernel.org/stable/c/8cace0eeb03d6043827faa6cf6c9067a9f05cd9f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-50517","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50517","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected b653db77350c7307a513b81856fe53e94cf42446 8cace0eeb03d6043827faa6cf6c9067a9f05cd9f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected b653db77350c7307a513b81856fe53e94cf42446 71e2d666ef85d51834d658830f823560c402b8b6 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.19","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.19 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.0.7 6.0.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"50517","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"50517","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"5.19","cpe7":"-","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"50517","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"5.19","cpe7":"rc4","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"50517","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"5.19","cpe7":"rc5","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"50517","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"5.19","cpe7":"rc6","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"50517","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"5.19","cpe7":"rc7","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"50517","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"5.19","cpe7":"rc8","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"50517","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"6.1","cpe7":"rc1","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2022","cve_id":"50517","cve":"CVE-2022-50517","epss":"0.001360000","percentile":"0.034430000","score_date":"2026-08-05","updated_at":"2026-08-06 00:00:37"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["mm/huge_memory.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"8cace0eeb03d6043827faa6cf6c9067a9f05cd9f","status":"affected","version":"b653db77350c7307a513b81856fe53e94cf42446","versionType":"git"},{"lessThan":"71e2d666ef85d51834d658830f823560c402b8b6","status":"affected","version":"b653db77350c7307a513b81856fe53e94cf42446","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["mm/huge_memory.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.19"},{"lessThan":"5.19","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.0.*","status":"unaffected","version":"6.0.7","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"6.1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.0.7","versionStartIncluding":"5.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1","versionStartIncluding":"5.19","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/huge_memory: do not clobber swp_entry_t during THP split\n\nThe following has been observed when running stressng mmap since commit\nb653db77350c (\"mm: Clear page->private when splitting or migrating a page\")\n\n   watchdog: BUG: soft lockup - CPU#75 stuck for 26s! [stress-ng:9546]\n   CPU: 75 PID: 9546 Comm: stress-ng Tainted: G            E      6.0.0-revert-b653db77-fix+ #29 0357d79b60fb09775f678e4f3f64ef0579ad1374\n   Hardware name: SGI.COM C2112-4GP3/X10DRT-P-Series, BIOS 2.0a 05/09/2016\n   RIP: 0010:xas_descend+0x28/0x80\n   Code: cc cc 0f b6 0e 48 8b 57 08 48 d3 ea 83 e2 3f 89 d0 48 83 c0 04 48 8b 44 c6 08 48 89 77 18 48 89 c1 83 e1 03 48 83 f9 02 75 08 <48> 3d fd 00 00 00 76 08 88 57 12 c3 cc cc cc cc 48 c1 e8 02 89 c2\n   RSP: 0018:ffffbbf02a2236a8 EFLAGS: 00000246\n   RAX: ffff9cab7d6a0002 RBX: ffffe04b0af88040 RCX: 0000000000000002\n   RDX: 0000000000000030 RSI: ffff9cab60509b60 RDI: ffffbbf02a2236c0\n   RBP: 0000000000000000 R08: ffff9cab60509b60 R09: ffffbbf02a2236c0\n   R10: 0000000000000001 R11: ffffbbf02a223698 R12: 0000000000000000\n   R13: ffff9cab4e28da80 R14: 0000000000039c01 R15: ffff9cab4e28da88\n   FS:  00007fab89b85e40(0000) GS:ffff9cea3fcc0000(0000) knlGS:0000000000000000\n   CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n   CR2: 00007fab84e00000 CR3: 00000040b73a4003 CR4: 00000000003706e0\n   DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n   DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n   Call Trace:\n    <TASK>\n    xas_load+0x3a/0x50\n    __filemap_get_folio+0x80/0x370\n    ? put_swap_page+0x163/0x360\n    pagecache_get_page+0x13/0x90\n    __try_to_reclaim_swap+0x50/0x190\n    scan_swap_map_slots+0x31e/0x670\n    get_swap_pages+0x226/0x3c0\n    folio_alloc_swap+0x1cc/0x240\n    add_to_swap+0x14/0x70\n    shrink_page_list+0x968/0xbc0\n    reclaim_page_list+0x70/0xf0\n    reclaim_pages+0xdd/0x120\n    madvise_cold_or_pageout_pte_range+0x814/0xf30\n    walk_pgd_range+0x637/0xa30\n    __walk_page_range+0x142/0x170\n    walk_page_range+0x146/0x170\n    madvise_pageout+0xb7/0x280\n    ? asm_common_interrupt+0x22/0x40\n    madvise_vma_behavior+0x3b7/0xac0\n    ? find_vma+0x4a/0x70\n    ? find_vma+0x64/0x70\n    ? madvise_vma_anon_name+0x40/0x40\n    madvise_walk_vmas+0xa6/0x130\n    do_madvise+0x2f4/0x360\n    __x64_sys_madvise+0x26/0x30\n    do_syscall_64+0x5b/0x80\n    ? do_syscall_64+0x67/0x80\n    ? syscall_exit_to_user_mode+0x17/0x40\n    ? do_syscall_64+0x67/0x80\n    ? syscall_exit_to_user_mode+0x17/0x40\n    ? do_syscall_64+0x67/0x80\n    ? do_syscall_64+0x67/0x80\n    ? common_interrupt+0x8b/0xa0\n    entry_SYSCALL_64_after_hwframe+0x63/0xcd\n\nThe problem can be reproduced with the mmtests config\nconfig-workload-stressng-mmap.  It does not always happen and when it\ntriggers is variable but it has happened on multiple machines.\n\nThe intent of commit b653db77350c patch was to avoid the case where\nPG_private is clear but folio->private is not-NULL.  However, THP tail\npages uses page->private for \"swp_entry_t if folio_test_swapcache()\" as\nstated in the documentation for struct folio.  This patch only clobbers\npage->private for tail pages if the head page was not in swapcache and\nwarns once if page->private had an unexpected value."}],"metrics":[{"cvssV3_1":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"providerMetadata":{"dateUpdated":"2026-08-04T09:09:19.553Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/8cace0eeb03d6043827faa6cf6c9067a9f05cd9f"},{"url":"https://git.kernel.org/stable/c/71e2d666ef85d51834d658830f823560c402b8b6"}],"title":"mm/huge_memory: do not clobber swp_entry_t during THP split","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2022-50517","datePublished":"2025-10-07T15:19:12.344Z","dateReserved":"2025-10-07T15:15:38.662Z","dateUpdated":"2026-08-04T09:09:19.553Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2025-10-07 16:15:35","lastModifiedDate":"2026-08-04 10:18:18","problem_types":["NVD-CWE-noinfo"],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9},{"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}]},"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19.1","versionEndExcluding":"6.0.7","matchCriteriaId":"4C6EA4ED-251A-4379-8E94-5B579DF1D554"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.19:-:*:*:*:*:*:*","matchCriteriaId":"9D759CCF-9E1B-41B2-81AA-CB580C5F3EEC"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.19:rc4:*:*:*:*:*:*","matchCriteriaId":"2E9C0DB0-D349-489F-A3D6-B77214E93A8A"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.19:rc5:*:*:*:*:*:*","matchCriteriaId":"1A0DE3B7-0FFB-45AA-9BD6-19870CA7C6FD"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.19:rc6:*:*:*:*:*:*","matchCriteriaId":"00AE778B-BAEE-49EB-9F84-003B73D7862A"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.19:rc7:*:*:*:*:*:*","matchCriteriaId":"C178431E-AD82-4B3D-B70F-A273A02ABD5D"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.19:rc8:*:*:*:*:*:*","matchCriteriaId":"2CF5D19C-C418-4B57-B52D-7795547F4096"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.1:rc1:*:*:*:*:*:*","matchCriteriaId":"E7E331DA-1FB0-4DEC-91AC-7DA69D461C11"}]}]}]},"legacy_mitre":{"record":{"CveYear":"2022","CveId":"50517","Ordinal":"1","Title":"mm/huge_memory: do not clobber swp_entry_t during THP split","CVE":"CVE-2022-50517","Year":"2022"},"notes":[{"CveYear":"2022","CveId":"50517","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/huge_memory: do not clobber swp_entry_t during THP split\n\nThe following has been observed when running stressng mmap since commit\nb653db77350c (\"mm: Clear page->private when splitting or migrating a page\")\n\n   watchdog: BUG: soft lockup - CPU#75 stuck for 26s! [stress-ng:9546]\n   CPU: 75 PID: 9546 Comm: stress-ng Tainted: G            E      6.0.0-revert-b653db77-fix+ #29 0357d79b60fb09775f678e4f3f64ef0579ad1374\n   Hardware name: SGI.COM C2112-4GP3/X10DRT-P-Series, BIOS 2.0a 05/09/2016\n   RIP: 0010:xas_descend+0x28/0x80\n   Code: cc cc 0f b6 0e 48 8b 57 08 48 d3 ea 83 e2 3f 89 d0 48 83 c0 04 48 8b 44 c6 08 48 89 77 18 48 89 c1 83 e1 03 48 83 f9 02 75 08 <48> 3d fd 00 00 00 76 08 88 57 12 c3 cc cc cc cc 48 c1 e8 02 89 c2\n   RSP: 0018:ffffbbf02a2236a8 EFLAGS: 00000246\n   RAX: ffff9cab7d6a0002 RBX: ffffe04b0af88040 RCX: 0000000000000002\n   RDX: 0000000000000030 RSI: ffff9cab60509b60 RDI: ffffbbf02a2236c0\n   RBP: 0000000000000000 R08: ffff9cab60509b60 R09: ffffbbf02a2236c0\n   R10: 0000000000000001 R11: ffffbbf02a223698 R12: 0000000000000000\n   R13: ffff9cab4e28da80 R14: 0000000000039c01 R15: ffff9cab4e28da88\n   FS:  00007fab89b85e40(0000) GS:ffff9cea3fcc0000(0000) knlGS:0000000000000000\n   CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n   CR2: 00007fab84e00000 CR3: 00000040b73a4003 CR4: 00000000003706e0\n   DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n   DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n   Call Trace:\n    <TASK>\n    xas_load+0x3a/0x50\n    __filemap_get_folio+0x80/0x370\n    ? put_swap_page+0x163/0x360\n    pagecache_get_page+0x13/0x90\n    __try_to_reclaim_swap+0x50/0x190\n    scan_swap_map_slots+0x31e/0x670\n    get_swap_pages+0x226/0x3c0\n    folio_alloc_swap+0x1cc/0x240\n    add_to_swap+0x14/0x70\n    shrink_page_list+0x968/0xbc0\n    reclaim_page_list+0x70/0xf0\n    reclaim_pages+0xdd/0x120\n    madvise_cold_or_pageout_pte_range+0x814/0xf30\n    walk_pgd_range+0x637/0xa30\n    __walk_page_range+0x142/0x170\n    walk_page_range+0x146/0x170\n    madvise_pageout+0xb7/0x280\n    ? asm_common_interrupt+0x22/0x40\n    madvise_vma_behavior+0x3b7/0xac0\n    ? find_vma+0x4a/0x70\n    ? find_vma+0x64/0x70\n    ? madvise_vma_anon_name+0x40/0x40\n    madvise_walk_vmas+0xa6/0x130\n    do_madvise+0x2f4/0x360\n    __x64_sys_madvise+0x26/0x30\n    do_syscall_64+0x5b/0x80\n    ? do_syscall_64+0x67/0x80\n    ? syscall_exit_to_user_mode+0x17/0x40\n    ? do_syscall_64+0x67/0x80\n    ? syscall_exit_to_user_mode+0x17/0x40\n    ? do_syscall_64+0x67/0x80\n    ? do_syscall_64+0x67/0x80\n    ? common_interrupt+0x8b/0xa0\n    entry_SYSCALL_64_after_hwframe+0x63/0xcd\n\nThe problem can be reproduced with the mmtests config\nconfig-workload-stressng-mmap.  It does not always happen and when it\ntriggers is variable but it has happened on multiple machines.\n\nThe intent of commit b653db77350c patch was to avoid the case where\nPG_private is clear but folio->private is not-NULL.  However, THP tail\npages uses page->private for \"swp_entry_t if folio_test_swapcache()\" as\nstated in the documentation for struct folio.  This patch only clobbers\npage->private for tail pages if the head page was not in swapcache and\nwarns once if page->private had an unexpected value.","Type":"Description","Title":"mm/huge_memory: do not clobber swp_entry_t during THP split"}]}}}