Why Linus Torvalds Urged Users to Avoid Linux 5.12‑rc1: A Swapfile Bug Story
Amid a severe snowstorm in the United States that left Linus Torvalds without power for six days, he rushed to release Linux 5.12‑rc1, only to discover a critical swapfile handling bug that could corrupt file systems, prompting a warning not to use the release and a quick fix in 5.12‑rc2.
During a severe snowstorm in the United States, Linux creator Linus Torvalds experienced a six‑day power outage but still managed to push out the 5.12‑rc1 kernel at the end of February.
Within a week, Torvalds sent a warning to the Linux kernel mailing list, urging users not to run the newly released 5.12‑rc1.
He noted that the tag “v5.12‑rc1” had been mysteriously renamed to “v5.12‑rc1‑dontuse”.
The “dontuse” label was applied because the updated code could break swapfile handling: the new code lost the correct offset to the start of a swapfile, potentially causing catastrophic data loss.
If the error occurs, the system may overwrite not only file data but also large amounts of metadata, possibly rendering the entire filesystem unusable.
Systems that do not use swapfiles are unaffected, but many Linux distributions still default to swap partitions rather than swapfiles.
Ubuntu, however, uses a swapfile by default; thus users of Ubuntu or Ubuntu‑based distributions such as Mint could see their entire root filesystem corrupted.
Linus released 5.12‑rc2 the next day, fixing the swapfile offset issue.
In addition to the swapfile fix, Torvalds mentioned that 5.12‑rc2 also reorganized some io_uring thread handling, making the code smaller and simpler.
Nevertheless, he cautioned Linux users against using early‑release rc kernels in production, as they may contain serious bugs.
Reference: https://arstechnica.com/gadgets/2021/03/psa-linux-folks-stay-away-from-the-5-12-rc1-kernel/
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
