What prevents distributions from using the latest Linux kernel?
I'm not working for a distribution, but I can think of at least two reasons:
- Some distributions apply their custom patches to the Kernel which are not merged into mainline yet. This means for every update of the Kernel they need to ensure that their patches don't break anything and still function properly.
- Even the latest stable Kernel release can contain a bug, distributions which take reliability seriously will want to go through some testing procedures/processes before delivering a Kernel to their customers.
The Linux kernel's system call interfaces are very stable. But the kernel has other interfaces that aren't always compatible.
/proc
is mostly stable, but there have been a few changes in the past (e.g. some interfaces moving to/sys
some time after/sys
was created).- A number of device-related interfaces have been removed in the past.
/sys
contains some stable interfaces (listed inDocumentation/ABI/stable
) and some that aren't. You aren't supposed to use the ones that aren't, but sometimes people do, and a simple security and stability upgrade shouldn't break things for them.- There have been incompatibilities with modutils in the past (newer kernels requiring a newer version of modutils), though I think it was quite a while ago.
- There have also been incompatibilities with respect to the boot process on some unusual configurations. Even increasing the size of the kernel could cause problems on some embedded systems.
- While the kernel's external interfaces are pretty stable, the internal interfaces are not. The rule for internal interfaces is that anyone can break them as long as they fix internal uses, but fixing third-party modules is the responsibility of the author of said modules. Overall quite a lot of installations run third-party modules: extra drivers for hardware that wasn't supported by the kernel (if the hardware is supported by the new kernel, that's fine, but what if it isn't), proprietary drivers (while the world would be a better place if all drivers were open source, this isn't the case; for example, if you want good 3D GPU performance, you're pretty much stuck with proprietary drivers), etc.
- Some people need to recompile their kernel, or some third-party modules. More recent kernels often can't be compiled with older compilers.
All in all, the primary reason not to switch to a more recent kernel version is third-party modules.
Some distributions nonetheless offer recent kernels as an option. For example, Debian makes kernels from testing available to users of the stable release through backports. Similarly, on Ubuntu LTS, kernels from more recent Ubuntu releases are available, but not used by default. This is mostly useful for new installations on hardware that wasn't supported yet when the distribution was finalized.