Skip to content

Commit

Permalink
Merge tag 'modules-for-v4.10-rc5' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/jeyu/linux

Pull modules fix from Jessica Yu:

 - fix out-of-tree module breakage when it supplies its own definitions
   of true and false

* tag 'modules-for-v4.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
  taint/module: Fix problems when out-of-kernel driver defines true or false
  • Loading branch information
Linus Torvalds committed Jan 17, 2017
2 parents 4b19a9e + 5eb7c0d commit 0aa0313
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,8 @@ extern enum system_states {
#define TAINT_FLAGS_COUNT 16

struct taint_flag {
char true; /* character printed when tainted */
char false; /* character printed when not tainted */
char c_true; /* character printed when tainted */
char c_false; /* character printed when not tainted */
bool module; /* also show as a per-module taint flag */
};

Expand Down
2 changes: 1 addition & 1 deletion kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ static size_t module_flags_taint(struct module *mod, char *buf)

for (i = 0; i < TAINT_FLAGS_COUNT; i++) {
if (taint_flags[i].module && test_bit(i, &mod->taints))
buf[l++] = taint_flags[i].true;
buf[l++] = taint_flags[i].c_true;
}

return l;
Expand Down
2 changes: 1 addition & 1 deletion kernel/panic.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ const char *print_tainted(void)
for (i = 0; i < TAINT_FLAGS_COUNT; i++) {
const struct taint_flag *t = &taint_flags[i];
*s++ = test_bit(i, &tainted_mask) ?
t->true : t->false;
t->c_true : t->c_false;
}
*s = 0;
} else
Expand Down

0 comments on commit 0aa0313

Please sign in to comment.