projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15a28c7
)
modpost: do not write out any file when error occurred
author
Masahiro Yamada
<masahiroy@kernel.org>
Sun, 24 Apr 2022 19:07:46 +0000
(
04:07
+0900)
committer
Masahiro Yamada
<masahiroy@kernel.org>
Sat, 7 May 2022 18:16:59 +0000
(
03:16
+0900)
If an error occurs, modpost will fail anyway. Do not write out
any content (, which might be invalid).
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
scripts/mod/modpost.c
patch
|
blob
|
history
diff --git
a/scripts/mod/modpost.c
b/scripts/mod/modpost.c
index 141370ebbfd342670d6c4679a069aae355e17d78..f0d48f65fb33f732d20771d8c0f780d91beea4dd 100644
(file)
--- a/
scripts/mod/modpost.c
+++ b/
scripts/mod/modpost.c
@@
-2333,6
+2333,9
@@
static void write_buf(struct buffer *b, const char *fname)
{
FILE *file;
+ if (error_occurred)
+ return;
+
file = fopen(fname, "w");
if (!file) {
perror(fname);