Skip to content
OriginalNewsLinux & Open Source

Linus Torvalds: tell your AI companion to get its act together

Torvalds merged a 41,204-line EXT4 pull request for Linux 7.4-rc5, mostly AI-generated fixes and new tests, then warned the maintainer that a fix for a subtle bug is itself likely to be buggy.

Tintype photograph of brass counter drums from a 19th-century adding machine, receding diagonally into darkness, one drum turned out of alignment with the rest
Brass counter drums from a 19th-century adding machine, one turned out of alignment: the count is the story, and one entry out of line is the risk.
On this page

In brief

  • Torvalds merged a 94-commit EXT4 pull for Linux 7.4-rc5, 41,204 insertions of mostly AI-generated fixes and new KUnit tests, while objecting to its timing.
  • His argument: a fix for a subtle, long-unnoticed bug is itself likely to be buggy, and release candidates exist to calm a release down, not absorb 41,000 lines.
  • Maintainer Theodore Ts'o apologized and offered a revised pull without the tests; the kernel's written AI policy already allows AI-written code with a human signer owning it.

Linus Torvalds merged a 41,204-line EXT4 pull request into the Linux 7.4-rc5 kernel on Tuesday, then told the maintainer who sent it that the update should never have arrived at this stage of the release. The pull was mostly AI-generated bug fixes and new tests built to make AI-generated patches safer to check. Torvalds' objection was not to the AI code. It was to the timing, and to the assumption underneath it: that a fix cannot introduce a bug of its own.

The pull came from Theodore Ts'o, the EXT4 maintainer, on November 24. It carried 94 commits across 68 files, with 41,204 insertions and 621 deletions. Torvalds quoted 41,197 insertions from the pull as sent; the merged commit counts 41,204. EXT4 is the default filesystem on most Linux distributions, which is why a change of this size to it lands with weight. The bulk of the new lines was KUnit tests, the kernel's unit-testing framework, added so future AI-generated patches can be validated against them. Ts'o's pull message says a huge number of bug fixes came with them, most of which were AI generated.

The fixes themselves are the unglamorous kind that filesystems depend on. Fixes to fast commit, EXT4's shortcut for journaling small changes, stop the filesystem losing data that programs had already forced to disk with fsync, the call programs use to make sure data is actually written, after a journal flush, and stop journal recovery failing on a torn fast commit. Other fixes check the return value of flush operations so fsync can report failed writeback, repair data loss in EXT4_IOC_MIGRATE for long contiguous ranges and for block sizes of 8K and above, and close out-of-bounds accesses and use-after-free bugs found in corrupted filesystems. These are defects that sat quietly for years. That is the point Torvalds makes next.

The pull also carried three performance improvements. One, from Samsung's Daejun Park, spreads the inodes of files in sibling directories across the block groups of a flex group, a set of block groups whose metadata is kept together, which cuts contention and speeds up parallel file creation. Another moves orphan-list tracking fields off the cache line shared with the journal state, which speeds up unlinking on filesystems without the orphan_file feature. The third speeds up fast commit replay for sparse files by skipping holes when shrinking the extent tree.

The reply

Torvalds took the pull anyway, despite what he called serious reservations and some bad conflicts from the merge, and then wrote back on the kernel mailing list. "STOP THINKING THAT YOU - OR AI - NEVER ADD BUGS WHEN YOU FIX SOMETHING." The idea that anything labelled a fix belongs in a release candidate is bogus, he wrote, because release candidates exist to calm a release down over several weeks. He said he had considered rejecting it outright, warned that next time he would ignore a pull like it, and closed with the line that made the rounds: tell your AI companion to get its act together, and do new development and test cases on a separate branch so they can be merged during the merge window.

Ts'o replied the same evening. He apologized, said the tests had been on a separate branch and were deliberately placed at the end of the pull so they could be dropped, and offered to send a revised pull ending at an earlier commit and save the tests for the merge window. As of Wednesday morning, Torvalds has not answered that offer in the thread.

A policy already on the books

The exchange is not about whether AI may write kernel code. The kernel has had written guidance for AI coding assistants since Linux 7.0, in Documentation/process/coding-assistants.rst. AI tools may help write code, but an AI agent must not add a Signed-off-by tag, only a human can certify the Developer Certificate of Origin, and the human submitter must review all AI-generated code and take full responsibility for it. AI-written code goes through the same process as any other contribution, with the same accountability and no separate fast path.

That is what makes the timing argument land. The tests in this pull exist to do the job the policy demands: checking AI-written fixes before they ship. Torvalds wants them. He wants them in the merge window, when new work is expected, and a release candidate is for proving the fixes, one candidate at a time. The merge window for Linux 7.5 is where the tests belong.

Linux 7.4-rc5 is due Sunday, November 29, according to Phoronix. The release-candidate weeks are now the test of both sides of the argument. If the fixes hold, the dispute stays a scheduling complaint. If one of them breaks something, and a filesystem bug is the kind of breakage users notice, Torvalds' warning becomes the story. Either way, the rule for contributors is now written twice over: once in the policy document, and once, in considerably blunter language, on the mailing list. AI can write the fix. A human signs for it, and the merge window is when it goes in.

Related reporting

More from grep.tips

All articles