'

Linux 4.8 adds Pi, Surface support but Linus Torvalds fumes over 'kernel-killing' bug

Linus Torvalds has sternly lectured a top Linux developer whose buggy fix "killed the kernel".

linustorvalds770x57.jpg

Linux kernel founder Linus Torvalds: "And that buggy crap is marked for stable, too."

Image: Aalto University/YouTube

Linux kernel founder Linus Torvalds is fuming over an "idiotic" bug that slipped into the final Linux kernel 4.8 release.

Announcing the 4.8 release on Sunday, Torvalds' correspondence on the Linux kernel mailing list appeared calm despite a few "pretty small" issues carried over from the eighth and final 4.8 release candidate. He signed off with his usual "go forth and test" command.

The several highlights of 4.8 include support for the touchscreen on Microsoft's Surface 3 device and the Raspberry Pi 3's System on a Chip.

​Linus on Linux's 25th birthday

Linus Torvalds describes Linux's secret origins.

Read More

But on Tuesday Torvalds returned to the mailing list to apologize for allowing a change submitted by top kernel developer and Google employee Andrew Morton, who sent Torvalds the kernel-killing code after the eighth 4.8 release candidate, apparently without adequately testing it.

Torvalds does take some of the blame for introducing the issue, but also lectured Morton for sloppy processes and wrongly assuming his change would have little impact.

"I'm really sorry I applied that last series from Andrew just before doing the 4.8 release, because they cause problems, and now it is in 4.8 (and that buggy crap is marked for stable too)," Torvalds said .

Morton's fix for a separate bug "killed the kernel" and was, Torvalds continued, "clearly worse than the bug it tried to fix".

"I should have reacted to the damn added BUG_ON() lines. I suspect I will have to finally just remove the idiotic BUG_ON() concept once and for all, because there is NO F*CKING EXCUSE to knowingly kill the kernel."

And, perhaps fairly, Torvalds wanted to know why killing the kernel wasn't a red flag for Morton, given it could have been predicted, had more testing occurred. Additionally, as Torvalds points out, he warned kernel developers against using BUG_ON() for debugging in 2002.

"Yes, I'm grumpy," wrote Torvalds. "This went in very late in the release candidates, and I had higher expectations of things coming in through Andrew. Adding random BUG_ON()'s to code that clearly hasn't had sufficient testing is *not* acceptable, and it's definitely not acceptable to send that to me after rc8 unless it has gotten a *lot* of testing, which it clearly must not have had. Adding stable to the cc too to warn about this."

Morton accepted the criticism, admitting "something's clearly wrong", but downplayed the impact since it was a "VM_BUG_ON and few people run with CONFIG_DEBUG_VM".

Torvalds wasn't having any of that, replying: "Ehh. If by 'few people' you mean 'pretty much everybody', you'd be right, but your choice of wording would be somewhat misleading, wouldn't you say?"

He goes onto point out that CONFIG_DEBUG_VM=y appears in the Fedora Linux distribution's kernel config.

"So *no*. VM_BUG_ON() is no less deadly than a regular BUG_ON(). It just allows some people to build smaller kernels, but apparently distro people would rather have debugging than save a few kB of RAM.

Torvald's parting advice to Morton: "Killing machines because somebody made an assumption that was wrong is not OK. Killing the machine is OK if we have a situation where there literally is no other choice."

More about Linus Torvalds and Linux