diff options
author | Lukas Bulwahn <lukas.bulwahn@gmail.com> | 2018-01-08 11:04:01 +0100 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-01-08 23:51:26 +0900 |
commit | 7c2ec43a2154c9cd6477f85de8d247ad491cf2d1 (patch) | |
tree | 74b4bc9879a749ef18daf53dd7f6fe8ab65be2fb /arch | |
parent | ae64f9bd1d3621b5e60d7363bc20afb46aede215 (diff) | |
download | op-kernel-dev-7c2ec43a2154c9cd6477f85de8d247ad491cf2d1.zip op-kernel-dev-7c2ec43a2154c9cd6477f85de8d247ad491cf2d1.tar.gz |
fixdep: exit with error code in error branches of do_config_file()
do_config_file() should exit with an error code on internal run-time
errors, and not return if it fails as then the error in do_config_file()
would go unnoticed in the current code and allow the build to continue.
The exit with error code will make the build fail in those very
exceptional cases. If this occurs, this actually indicates a deeper
problem in the execution of the kernel build process.
Now, in these error cases, we do not explicitly free memory and close
the file handlers in do_config_file(), as this is covered by exit().
This issue in the fixdep script was introduced with its initial
implementation back in 2002 by the original author Kai Germaschewski with
this commit 04bd72170653 ("kbuild: Make dependencies at compile time")
in the linux history git tree, i.e.,
git://git.kernel.org/pub/scm/linux/kernel/git/history/history.git.
This issue was identified during the review of a previous patch that
intended to address a memory leak detected by a static analysis tool.
Link: https://lkml.org/lkml/2017/12/14/736
Suggested-by: Nicholas Mc Guire <der.herr@hofr.at>
Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions