News: 0001658011

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux Patched For Silent User-Space Data Loss Bug That's Existed Since 2023

([Linux Kernel] 6 Hours Ago Silent Data Loss)


Being merged after yesterday's [1]Linux 7.3-rc3 release was an important fix for addressing a silent, user-space data loss bug that has existed in the kernel the past three years.

[2]Reported at the beginning of the month was the bug and a small C program to reproduce the issue. If the kernel is running with transparent hugepages (THP) enabled and under cgroup limits, writes that happen after a MADV_FREE call could be completely lost.

This bug isn't hypothetical but has come up in production with at least users of the Polars data analytics library finding production data loss from this kernel bug. Triggering it requires the right mix of transparent hugepage usage, MADV_FREE usage, and heavy memory reclaim pressure. [3]This patch fixes the bug and fortunately amounts to just one line of code changed.

The patch was merged as part of [4]this week's x86/urgent merge . It's also marked for back-porting to the currently supported stable kernel series. The bug was introduced back in July 2023 and present in kernel releases since Linux 6.6.



[1] https://www.phoronix.com/news/Linux-7.3-rc3-Released

[2] https://lore.kernel.org/all/CAJxLxMUGu1-L+O_nAONOwOXnS=cNbNApCWqdthRjd76LThtSPg@mail.gmail.com/

[3] https://lore.kernel.org/linux-mm/20260903031608.1194238-1-vernon2gm@gmail.com/

[4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=704340f1cd0dcef829eb62f5b48ae95a2ce17bdf



"Though a program be but three lines long,
someday it will have to be maintained."
-- The Tao of Programming