Writing
Not every bug fix belongs in a release candidate
Linus Torvalds reluctantly merged a 41,000-line EXT4 pull into Linux 7.4-rc5, full of AI-generated fixes and new tests, and warned he'd ignore the next one. What happened, why he's right, and what every team shipping AI-generated fixes should take from it.
- Published
- Reading time
- 11 min read

Yesterday, Linus Torvalds pulled a 41,197-line EXT4 update into Linux 7.4-rc5, then told the people who sent it to "get your sh*t together". The pull was full of AI-generated bug fixes and thousands of lines of new tests, and it landed in the part of the release cycle where the kernel is supposed to be calming down. He merged it anyway, with what he called "serious reservations", and made it clear that the next one like it gets ignored.
It's easy to read this as another Torvalds rant and move on. I think it's one of the clearest statements I've seen so far about what AI is doing to software maintenance, and the lesson applies well beyond the kernel.
Linus Torvalds at LinuxCon Europe. Photo by Krd, CC BY-SA 4.0
#What happened
On November 24, Ted Ts'o, the EXT4 maintainer, sent his filesystem pull request for 7.4-rc5. According to Phoronix (opens in a new tab) and other outlets that covered the thread, it contained three kinds of changes:
- A large batch of bug fixes, most of them AI-generated. They covered fast-commit data loss after
fsync, data loss and a use-after-free of extent blocks during migration, stale data zeroing, and out-of-bounds accesses on corrupted filesystems. - Thousands of lines of new KUnit tests, which made up most of the 41,197 insertions. The stated goal was to make the validation of AI-generated patches safer.
- A few performance changes, including one from Samsung's Daejun Park that spreads inodes across a flex group and reportedly took parallel file creation from about 290k to 780k files per second with 16 tasks.
Torvalds replied the same day. He took the pull, said he had considered unpulling it, and gave a warning instead:
Honestly, I don't think this was appropriate for this stage. You should have kept your tests in a separate branch for your testing, and done this huge update for the next merge window.
And the line that I think every engineer should pin somewhere:
STOP THINKING THAT YOU - OR AI - NEVER ADD BUGS WHEN YOU FIX SOMETHING.
He also told Ts'o to "tell your AI companion to get its act together", and to do new development and test cases on a separate branch so they can be merged during the merge window.
EXT4 wasn't the only subsystem pushing a lot at rc5. The HID pull for the same release candidate was also larger than desired, and its maintainers pointed to (opens in a new tab) "the continued flow of AI fixes" and slower review. Torvalds had already described rc4 as huge.
#Why the timing matters so much
If you don't follow kernel development, here's the short version. Every release starts with a merge window of about two weeks, where new features and large changes go in. That window closes with -rc1. After that, the kernel goes through weekly release candidates until it's stable, and the documented rule (opens in a new tab) is that only patches fixing problems should be submitted.
Ts'o's pull technically followed the letter of that rule. Most of it was fixes or tests for fixes. Torvalds' point is that it broke the spirit of it, and he said so directly: "This whole notion of 'anything that is a fix goes in -rc' is bogus."
Release candidates exist so a release can stop moving. Each week the changes should get smaller, so that the people testing the kernel are testing something close to what will ship. A 41,000-line update at rc5 resets a good part of that work, whatever label is on it.
#Torvalds is right
I don't have a nuanced take here. He's right, and I'm glad he said it the way he did.
I know the tone will be what a lot of people talk about. But the Linux kernel runs on most of the world's servers, phones and embedded devices, and EXT4 is the filesystem holding a huge share of that data. When the cost of a mistake is corrupted data on millions of machines, I'd rather the person guarding the release be harsh than polite. A polite warning is easy to ignore, and this one won't be.
The fixes themselves were real. Data loss after fsync and a use-after-free are exactly the kind of bugs you want fixed. That's not what's being argued. The question is when they ship, and how much else ships with them.
#Every fix is a change
Torvalds made an argument in the thread that I think is the most important one in this whole story:
If the bugs were subtle things that have been around for a while without being detected by AI, the fixes by definition are fixing something subtle and rare that nobody has noticed until now. And that makes the fixes possibly buggy.
Code that has worked for years has been tested by every machine that ran it. A fix to that code has been tested by whoever wrote it, and in this case, partly by a model. The fix can be correct and still change timing, locking or error paths in ways nobody predicted. It's new code touching old, trusted code, and it should be treated with at least the same suspicion as a feature.
This is where I draw the line between a fix that can go in late and one that has to wait. A late fix should be for something that's actively breaking, or that's going to cause serious damage if it ships as is: a regression introduced in this cycle, a crash people are hitting, a security hole being exploited. A subtle bug that has been sitting in the code for years, unnoticed by everyone, is not urgent just because a model found it this week. These patches were useful, but they could have been taken slowly, reviewed properly, and merged in the next window.
#AI is flooding maintainers
The second problem is volume. Last month, at the Maintainers Summit, Torvalds described (opens in a new tab) the kernel's AI situation as two separate problems: AI finds real bugs in a large codebase, which adds work for maintainers who are already overloaded, and people use AI to generate patches without understanding the code.
The EXT4 pull is the first problem in its purest form. Nobody here was clueless. Ts'o has maintained EXT4 for a very long time. But the bugs were found faster than anyone could digest the fixes, and the result was 41,000 lines arriving at once in a release candidate.
I wrote about this in Unopinionated frameworks are dangerous in the AI era: when AI makes writing code cheap, reviewing it becomes the expensive part. The same idea shows up in Refactoring is as important as building, where I argued that AI made change cheap to execute without making it wise. AI can produce fixes much faster than before. The number of people who can review them, test them and own them hasn't changed. That gap is the real limit on how much AI-generated code a project can absorb, and pretending it isn't there just moves the cost to the people downstream.
#AI tests validating AI fixes
The tests are the part of this story that worries me the most.
The stated purpose of the new KUnit tests was to make the validation of AI-generated patches safer. On paper, that sounds responsible. In practice, if the same kind of tool writes both the fix and the tests that validate it, you've built a loop where the model checks its own homework.
I don't think 100% AI-written tests should be a thing, and especially not in a system as critical as the Linux kernel. I've seen models do all of these:
- Write tests that only cover the cases their own fix handles, and miss the edge cases a human who knows the code would think of immediately.
- Adjust the test, or the code under test, until it passes, instead of asking whether the expectation was right in the first place.
- Produce a large, impressive-looking suite that asserts very little.
A test suite is only as good as the intent behind it. Someone who understands the filesystem has to decide what needs to be true: what must never happen after an fsync, what a corrupted extent tree should and shouldn't do. A model can help write the code for those tests. It shouldn't be the one deciding what they check, and a few thousand lines of tests nobody had time to read don't make anything safer. They make it look safer, which is worse.
And even if the tests were perfect, Torvalds' point still stands: they belonged in a separate branch, merged during the window, not in rc5.
#I've made this mistake too
I'm not writing this from a position of never having done it.
A while back, I was working on an HR system. There were structural problems in the codebase that I knew needed fixing, and I never found the time to do it properly. So I did it right before a release. They were big refactors and structural changes, and they were genuinely useful, but they were rushed. The release slipped, and when it finally shipped, it broke production.
None of those changes were wrong in principle. The timing was wrong, and the size was wrong. I took a codebase that had been stable enough to release and turned it into something nobody, including me, had properly tested. That's the same mistake on a much smaller scale, and I didn't even have AI to blame for the volume.
#What I do now
I've been a one-person team for most of my career, which means I'm usually the author, the reviewer and the person who gets the call when production breaks. That changes how you think about change.
My rule is simple: keep everything physically reviewable. Even when an AI could produce a huge change in one go, I narrow the scope until I can review every line myself before it goes anywhere near production. A change I can't fully read is a change I can't own, no matter who or what wrote it.
From this story and my own experience, here's what I'd suggest for any team using AI to produce fixes:
Set size and risk limits for late changes. Close to a release, a fix should be small, targeted and tied to a problem that's actually hurting someone. If it's large, touches many areas, or fixes something that's been quietly broken for years, it waits for the next cycle. Write that rule down so it doesn't get decided under pressure.
Treat every fix as a change that can add bugs. Review it, test it and roll it out like a feature. "It's just a fix" isn't a reason to skip any of that, and AI-generated fixes for old, subtle bugs deserve more scrutiny, not less.
Treat review capacity as the real limit on AI throughput. If your models find fifty bugs a week and your team can properly review ten fixes, you ship ten. The other forty go into a queue. Shipping fixes faster than anyone can understand them is how you trade old, known bugs for new, unknown ones.
Keep a human in charge of what the tests check. Let AI help write test code, but a person who knows the system decides what each test is supposed to prove and reads the result. If nobody can explain what a test protects against, it doesn't count as validation.
#Conclusion
AI is finding real bugs, and that's good news. But finding a bug and safely shipping a fix are two very different amounts of work, and AI only made the first one cheap. Release discipline, review and ownership are still on us.
The kernel has rules for when changes can go in, and they exist because people learned the hard way what happens without them. Torvalds merged this pull and gave everyone a fair warning. I hope people take it seriously, and take more responsibility for what they send, especially when they contribute to software that the rest of the world depends on.
Image credits: photo of Linus Torvalds by Krd, CC BY-SA 4.0 (opens in a new tab), via Wikimedia Commons (opens in a new tab).
- Tech news
- Thoughts
- Linux
- AI
- Open Source