I've been reading an interesting article by Liguo Yu et. al., "Maintainability of the kernels of open-source operating systems: A comparison of Linux with FreeBSD, NetBSD, and OpenBSD" (DOI: 10.1016/j.jss.2005.08.014). Keep in mind, the article is from 2005 (published in 2006), so it would be interesting to know how things have changed since then. We are talking here about #Linux 2,4,20, #FreeBSD 5.1, #NetBSD 1.6 and #OpenBSD 3.3.
The article basically explores maintainability of said OSes judging mainly by usage of global variables.
Here's some interesting takeouts.
"Unsafe definition" is in their terms a usage of global variables between kernel modules and non-kernel modules.