by Swapnil Bhartiya

Linus Torvalds rants against bad code

Nov 02, 2015
LinuxOpen Source

Torvalds wants you to know that there's no scope for bad code in the Linux kernelrn

Linus Torvalds, the father of Linux kernel, is known for his rants. As colorful as they may be, they usually hit the nail on the head on a technical level.

Now, Torvalds is ranting again. This time in response to a pull request by David Miller, Linus wrote a long rant. What makes this particular rant of interest is that it does highlight why the code is bad.

Here is the post in its entirety:

Christ people. This is just sh*t. The conflict I get is due to stupid new gcc header file crap. But what makes me upset is that the crap is for completely bogus reasons. This is the old code in net/ipv6/ip6_output.c: mtu -= hlen + sizeof(struct frag_hdr); and this is the new “improved” code that uses fancy stuff that wants magical built-in compiler support and has silly wrapper functions for when it doesn’t exist: if (overflow_usub(mtu, hlen + sizeof(struct frag_hdr), &mtu) || mtu

Miller made changes and pushed another pull request.