KERNEL_VERSION inconsistency using out-of-tree module with patched kernel source
Hello!
Kernel modules depend on a specific version of the kernel package that includes the Git commit hash of the kernel source tree at compile time (KERNEL_VERSION). When using a patched kernel source this Git commit hash changes each time the patches get applied, making each kernel binary effectively unique. This KERNEL_VERSION, however, is not part of the shared state hash signature, as for this purpose it gets replaced by the plain LINUX_VERSION.
Building out-of-tree kernel modules depends on a locally compiled kernel. Performing this in a clean working directory leads to a newly patched kernel source which in turn results in a new KERNEL_VERSION.