Fundamentals 4 min read

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.

21CTO
21CTO
21CTO
Why Linus Torvalds Urged Users to Avoid Linux 5.12‑rc1: A Swapfile Bug Story

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/

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

rc releaseLinus Torvaldsswapfile bug
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.