{"api_version":"1","generated_at":"2026-07-23T13:08:14+00:00","cve":"CVE-2025-39813","urls":{"html":"https://cve.report/CVE-2025-39813","api":"https://cve.report/api/cve/CVE-2025-39813.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2025-39813","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2025-39813"},"summary":{"title":"ftrace: Fix potential warning in trace_printk_seq during ftrace_dump","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nftrace: Fix potential warning in trace_printk_seq during ftrace_dump\n\nWhen calling ftrace_dump_one() concurrently with reading trace_pipe,\na WARN_ON_ONCE() in trace_printk_seq() can be triggered due to a race\ncondition.\n\nThe issue occurs because:\n\nCPU0 (ftrace_dump)                              CPU1 (reader)\necho z > /proc/sysrq-trigger\n\n!trace_empty(&iter)\ntrace_iterator_reset(&iter) <- len = size = 0\n                                                cat /sys/kernel/tracing/trace_pipe\ntrace_find_next_entry_inc(&iter)\n  __find_next_entry\n    ring_buffer_empty_cpu <- all empty\n  return NULL\n\ntrace_printk_seq(&iter.seq)\n  WARN_ON_ONCE(s->seq.len >= s->seq.size)\n\nIn the context between trace_empty() and trace_find_next_entry_inc()\nduring ftrace_dump, the ring buffer data was consumed by other readers.\nThis caused trace_find_next_entry_inc to return NULL, failing to populate\n`iter.seq`. At this point, due to the prior trace_iterator_reset, both\n`iter.seq.len` and `iter.seq.size` were set to 0. Since they are equal,\nthe WARN_ON_ONCE condition is triggered.\n\nMove the trace_printk_seq() into the if block that checks to make sure the\nreturn value of trace_find_next_entry_inc() is non-NULL in\nftrace_dump_one(), ensuring the 'iter.seq' is properly populated before\nsubsequent operations.","state":"PUBLISHED","assigner":"Linux","published_at":"2025-09-16 13:15:55","updated_at":"2026-05-12 13:17:13"},"problem_types":["CWE-362"],"metrics":[{"version":"3.1","source":"nvd@nist.gov","type":"Primary","score":"4.7","severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":4.7,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"}}],"references":[{"url":"https://git.kernel.org/stable/c/ced94e137e6cd5e79c65564841d3b7695d0f5fa3","name":"https://git.kernel.org/stable/c/ced94e137e6cd5e79c65564841d3b7695d0f5fa3","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","name":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":["Third Party Advisory"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/a6f0f8873cc30fd4543b09adf03f7f51d293f0e6","name":"https://git.kernel.org/stable/c/a6f0f8873cc30fd4543b09adf03f7f51d293f0e6","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/28c8fb7ae2ad27d81c8de3c4fe608c509f6a18aa","name":"https://git.kernel.org/stable/c/28c8fb7ae2ad27d81c8de3c4fe608c509f6a18aa","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/4013aef2ced9b756a410f50d12df9ebe6a883e4a","name":"https://git.kernel.org/stable/c/4013aef2ced9b756a410f50d12df9ebe6a883e4a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/fbd4cf7ee4db65ef36796769fe978e9eba6f0de4","name":"https://git.kernel.org/stable/c/fbd4cf7ee4db65ef36796769fe978e9eba6f0de4","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-032379.html","name":"https://cert-portal.siemens.com/productcert/html/ssa-032379.html","refsource":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/f299353e7ccbcc5c2ed8993c48fbe7609cbe729a","name":"https://git.kernel.org/stable/c/f299353e7ccbcc5c2ed8993c48fbe7609cbe729a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5ab0ec206deb99eb3baf8f1d7602aeaa91dbcc85","name":"https://git.kernel.org/stable/c/5ab0ec206deb99eb3baf8f1d7602aeaa91dbcc85","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e80ff23ba8bdb0f41a1afe2657078e4097d13a9a","name":"https://git.kernel.org/stable/c/e80ff23ba8bdb0f41a1afe2657078e4097d13a9a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","name":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":["Third Party Advisory"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-39813","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39813","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d769041f865330034131525ee6a7f72eb4af2a24 f299353e7ccbcc5c2ed8993c48fbe7609cbe729a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d769041f865330034131525ee6a7f72eb4af2a24 5ab0ec206deb99eb3baf8f1d7602aeaa91dbcc85 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d769041f865330034131525ee6a7f72eb4af2a24 a6f0f8873cc30fd4543b09adf03f7f51d293f0e6 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d769041f865330034131525ee6a7f72eb4af2a24 e80ff23ba8bdb0f41a1afe2657078e4097d13a9a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d769041f865330034131525ee6a7f72eb4af2a24 28c8fb7ae2ad27d81c8de3c4fe608c509f6a18aa git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d769041f865330034131525ee6a7f72eb4af2a24 ced94e137e6cd5e79c65564841d3b7695d0f5fa3 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d769041f865330034131525ee6a7f72eb4af2a24 fbd4cf7ee4db65ef36796769fe978e9eba6f0de4 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d769041f865330034131525ee6a7f72eb4af2a24 4013aef2ced9b756a410f50d12df9ebe6a883e4a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2.6.28","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 2.6.28 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.4.298 5.4.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.242 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.191 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.150 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.104 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.45 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.16.5 6.16.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.17 * original_commit_for_fix","platforms":[]},{"source":"ADP","vendor":"Siemens","product":"SIMATIC CN 4100","version":"affected V5.0 custom","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2025","cve_id":"39813","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":[{"providerMetadata":{"dateUpdated":"2025-11-03T17:43:38.484Z","orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE"},"references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"}],"title":"CVE Program Container"},{"affected":[{"defaultStatus":"unknown","product":"SIMATIC CN 4100","vendor":"Siemens","versions":[{"lessThan":"V5.0","status":"affected","version":"0","versionType":"custom"}]}],"providerMetadata":{"dateUpdated":"2026-05-12T12:07:14.764Z","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","shortName":"siemens-SADP"},"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-032379.html"}],"x_adpType":"supplier"}],"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["kernel/trace/trace.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"f299353e7ccbcc5c2ed8993c48fbe7609cbe729a","status":"affected","version":"d769041f865330034131525ee6a7f72eb4af2a24","versionType":"git"},{"lessThan":"5ab0ec206deb99eb3baf8f1d7602aeaa91dbcc85","status":"affected","version":"d769041f865330034131525ee6a7f72eb4af2a24","versionType":"git"},{"lessThan":"a6f0f8873cc30fd4543b09adf03f7f51d293f0e6","status":"affected","version":"d769041f865330034131525ee6a7f72eb4af2a24","versionType":"git"},{"lessThan":"e80ff23ba8bdb0f41a1afe2657078e4097d13a9a","status":"affected","version":"d769041f865330034131525ee6a7f72eb4af2a24","versionType":"git"},{"lessThan":"28c8fb7ae2ad27d81c8de3c4fe608c509f6a18aa","status":"affected","version":"d769041f865330034131525ee6a7f72eb4af2a24","versionType":"git"},{"lessThan":"ced94e137e6cd5e79c65564841d3b7695d0f5fa3","status":"affected","version":"d769041f865330034131525ee6a7f72eb4af2a24","versionType":"git"},{"lessThan":"fbd4cf7ee4db65ef36796769fe978e9eba6f0de4","status":"affected","version":"d769041f865330034131525ee6a7f72eb4af2a24","versionType":"git"},{"lessThan":"4013aef2ced9b756a410f50d12df9ebe6a883e4a","status":"affected","version":"d769041f865330034131525ee6a7f72eb4af2a24","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["kernel/trace/trace.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"2.6.28"},{"lessThan":"2.6.28","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.4.*","status":"unaffected","version":"5.4.298","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.242","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.191","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.150","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.104","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.45","versionType":"semver"},{"lessThanOrEqual":"6.16.*","status":"unaffected","version":"6.16.5","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"6.17","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.4.298","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.242","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.191","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.150","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.104","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.45","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.16.5","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.17","versionStartIncluding":"2.6.28","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nftrace: Fix potential warning in trace_printk_seq during ftrace_dump\n\nWhen calling ftrace_dump_one() concurrently with reading trace_pipe,\na WARN_ON_ONCE() in trace_printk_seq() can be triggered due to a race\ncondition.\n\nThe issue occurs because:\n\nCPU0 (ftrace_dump)                              CPU1 (reader)\necho z > /proc/sysrq-trigger\n\n!trace_empty(&iter)\ntrace_iterator_reset(&iter) <- len = size = 0\n                                                cat /sys/kernel/tracing/trace_pipe\ntrace_find_next_entry_inc(&iter)\n  __find_next_entry\n    ring_buffer_empty_cpu <- all empty\n  return NULL\n\ntrace_printk_seq(&iter.seq)\n  WARN_ON_ONCE(s->seq.len >= s->seq.size)\n\nIn the context between trace_empty() and trace_find_next_entry_inc()\nduring ftrace_dump, the ring buffer data was consumed by other readers.\nThis caused trace_find_next_entry_inc to return NULL, failing to populate\n`iter.seq`. At this point, due to the prior trace_iterator_reset, both\n`iter.seq.len` and `iter.seq.size` were set to 0. Since they are equal,\nthe WARN_ON_ONCE condition is triggered.\n\nMove the trace_printk_seq() into the if block that checks to make sure the\nreturn value of trace_find_next_entry_inc() is non-NULL in\nftrace_dump_one(), ensuring the 'iter.seq' is properly populated before\nsubsequent operations."}],"providerMetadata":{"dateUpdated":"2026-05-11T21:36:50.968Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/f299353e7ccbcc5c2ed8993c48fbe7609cbe729a"},{"url":"https://git.kernel.org/stable/c/5ab0ec206deb99eb3baf8f1d7602aeaa91dbcc85"},{"url":"https://git.kernel.org/stable/c/a6f0f8873cc30fd4543b09adf03f7f51d293f0e6"},{"url":"https://git.kernel.org/stable/c/e80ff23ba8bdb0f41a1afe2657078e4097d13a9a"},{"url":"https://git.kernel.org/stable/c/28c8fb7ae2ad27d81c8de3c4fe608c509f6a18aa"},{"url":"https://git.kernel.org/stable/c/ced94e137e6cd5e79c65564841d3b7695d0f5fa3"},{"url":"https://git.kernel.org/stable/c/fbd4cf7ee4db65ef36796769fe978e9eba6f0de4"},{"url":"https://git.kernel.org/stable/c/4013aef2ced9b756a410f50d12df9ebe6a883e4a"}],"title":"ftrace: Fix potential warning in trace_printk_seq during ftrace_dump","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2025-39813","datePublished":"2025-09-16T13:00:14.846Z","dateReserved":"2025-04-16T07:20:57.137Z","dateUpdated":"2026-05-12T12:07:14.764Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2025-09-16 13:15:55","lastModifiedDate":"2026-05-12 13:17:13","problem_types":["CWE-362"],"metrics":{"cvssMetricV31":[{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":4.7,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":1,"impactScore":3.6}]},"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.28","versionEndExcluding":"5.4.298","matchCriteriaId":"FAC85C88-8EB4-481B-BAFD-B69CEBEFC6AA"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"5.10.242","matchCriteriaId":"CFAE7D1D-31D7-4259-8581-3CB64D12DE3B"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.15.191","matchCriteriaId":"A532F1D1-B7A9-4745-AB0E-B6AD12CAD0BD"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.1.150","matchCriteriaId":"67AC87D5-97BF-4617-92EF-9E282B6D1CF7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"6.6.104","matchCriteriaId":"FD12E3C3-F737-4936-9A57-80832E36D22F"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.12.45","matchCriteriaId":"DC443D7D-A411-41FB-BB45-010F36EF7C94"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13","versionEndExcluding":"6.16.5","matchCriteriaId":"EB781080-7001-4FA1-B388-517FFEFBC73E"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*","matchCriteriaId":"327D22EF-390B-454C-BD31-2ED23C998A1C"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*","matchCriteriaId":"C730CD9A-D969-4A8E-9522-162AAF7C0EE9"}]}]},{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","matchCriteriaId":"FA6FEEC2-9F11-4643-8827-749718254FED"}]}]}]},"legacy_mitre":{"record":{"CveYear":"2025","CveId":"39813","Ordinal":"1","Title":"ftrace: Fix potential warning in trace_printk_seq during ftrace_","CVE":"CVE-2025-39813","Year":"2025"},"notes":[{"CveYear":"2025","CveId":"39813","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nftrace: Fix potential warning in trace_printk_seq during ftrace_dump\n\nWhen calling ftrace_dump_one() concurrently with reading trace_pipe,\na WARN_ON_ONCE() in trace_printk_seq() can be triggered due to a race\ncondition.\n\nThe issue occurs because:\n\nCPU0 (ftrace_dump)                              CPU1 (reader)\necho z > /proc/sysrq-trigger\n\n!trace_empty(&iter)\ntrace_iterator_reset(&iter) <- len = size = 0\n                                                cat /sys/kernel/tracing/trace_pipe\ntrace_find_next_entry_inc(&iter)\n  __find_next_entry\n    ring_buffer_empty_cpu <- all empty\n  return NULL\n\ntrace_printk_seq(&iter.seq)\n  WARN_ON_ONCE(s->seq.len >= s->seq.size)\n\nIn the context between trace_empty() and trace_find_next_entry_inc()\nduring ftrace_dump, the ring buffer data was consumed by other readers.\nThis caused trace_find_next_entry_inc to return NULL, failing to populate\n`iter.seq`. At this point, due to the prior trace_iterator_reset, both\n`iter.seq.len` and `iter.seq.size` were set to 0. Since they are equal,\nthe WARN_ON_ONCE condition is triggered.\n\nMove the trace_printk_seq() into the if block that checks to make sure the\nreturn value of trace_find_next_entry_inc() is non-NULL in\nftrace_dump_one(), ensuring the 'iter.seq' is properly populated before\nsubsequent operations.","Type":"Description","Title":"ftrace: Fix potential warning in trace_printk_seq during ftrace_"}]}}}