Being merged after yesterday's 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. 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. This patch fixes the bug and fortunately amounts to just one line of code changed. The patch was merged as part of 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.
Linux Patched For Silent User-Space Data Loss Bug That's Existed Since 2023
Full Article
Original Source
Read the full article at Phoronix →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.