]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kbuild: make scripts/adjust_autoksyms.sh robust against timestamp races
authorNicolas Pitre <nicolas.pitre@linaro.org>
Thu, 15 Mar 2018 20:56:20 +0000 (16:56 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:50:37 +0000 (07:50 +0200)
commitdf17a3408d5e21919d40d72141befb08fcb197fe
tree9156c31835bfb3b9a44a475cf2a0827f047ad9eb
parent78e7409901054e87559f15724652b4d666bd7f8a
kbuild: make scripts/adjust_autoksyms.sh robust against timestamp races

[ Upstream commit 825d487583089f9a33d31650c9c41f6474aab7fc ]

Some filesystems have timestamps with coarse precision that may allow
for a recently built object file to have the same timestamp as the
updated time on one of its dependency files. When that happens, the
object file doesn't get rebuilt as it should.

This is especially the case on filesystems that don't have sub-second
time precision, such as ext3 or Ext4 with 128B inodes.

Let's prevent that by making sure updated dependency files have a newer
timestamp than the first file we created (i.e. autoksyms.h.tmpnew).

Reported-by: Thomas Lindroth <thomas.lindroth@gmail.com>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Thomas Lindroth <thomas.lindroth@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/adjust_autoksyms.sh