Modules fixes for v4.10-rc5
- Fix out-of-tree module breakage when it supplies its own definitions of true and false Signed-off-by: Jessica Yu <jeyu@redhat.com> -----BEGIN PGP SIGNATURE----- iQIcBAABCgAGBQJYfm7sAAoJEMBFfjjOO8FyrmMP/j1Sa179+uBWWPE0Td7ip6yj EgvOtZGcnZfMuHbs5Evn8Fnz5K3of3IriiJNPePuQPu/YnoidltxkWOMXYkCj+Fn acW8VRtrh2urec70gRapuTmSpxs1I/XLUdNG+Ozm0FFX+L+k0ydCqEPGuVkwyHNK Wn31lVTiqx+zWm5PAJBzD6dEchQ0h2uppHRmZ+mIn3GyvYavIGnMMkdjqEEq9v8w UYdw52AJFAGMDO8LoSihX5cFbe0E28A58jkJuJ5AKXglaY6Nvl2xWOxfLhFnxO1m 7KFuf+q2YO10hoJtdItEmPw2iC8pIgoAUGpZ+4h0iSWxyUC5V4QEmrhe4q9CtOLD +dfcd+44UekvWiWL4AQUO6IsUzIo8UqsJYf4Tic4/EjAKZtGTseKjQqCgBv3kJA+ nN3hJ9gMN4NZWOMLihSn7Ml/whrxchdqlEP520nzGTnWUaLOUPp4XhfNlDaAH58K WfxiT0L6w+Cbg3xMCZRxQyqlJWWw8x1CM7B6eScHvN67TulC2enIQYTkv6eDOzQX DPz4lvcFisjASFP+i+3ouYL2pfLnm/IUG9K1wieqBvPHEdeZBuGr7+VEHjFmhhmG f3kKvYsRgUQF8tKeGtI0uPxnZNw4z4QaYOVKf8bISzpsIHOezdaouOm+KGUctHqO DNIWMf34W7fE5AVrGKp6 =ybIc -----END PGP SIGNATURE----- Merge tag 'modules-for-v4.10-rc5' of git://git.kernel.org/pub/scm/linux/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
This commit is contained in:
commit
0aa0313f9d
|
@ -514,8 +514,8 @@ extern enum system_states {
|
||||||
#define TAINT_FLAGS_COUNT 16
|
#define TAINT_FLAGS_COUNT 16
|
||||||
|
|
||||||
struct taint_flag {
|
struct taint_flag {
|
||||||
char true; /* character printed when tainted */
|
char c_true; /* character printed when tainted */
|
||||||
char false; /* character printed when not tainted */
|
char c_false; /* character printed when not tainted */
|
||||||
bool module; /* also show as a per-module taint flag */
|
bool module; /* also show as a per-module taint flag */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1145,7 +1145,7 @@ static size_t module_flags_taint(struct module *mod, char *buf)
|
||||||
|
|
||||||
for (i = 0; i < TAINT_FLAGS_COUNT; i++) {
|
for (i = 0; i < TAINT_FLAGS_COUNT; i++) {
|
||||||
if (taint_flags[i].module && test_bit(i, &mod->taints))
|
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;
|
return l;
|
||||||
|
|
|
@ -355,7 +355,7 @@ const char *print_tainted(void)
|
||||||
for (i = 0; i < TAINT_FLAGS_COUNT; i++) {
|
for (i = 0; i < TAINT_FLAGS_COUNT; i++) {
|
||||||
const struct taint_flag *t = &taint_flags[i];
|
const struct taint_flag *t = &taint_flags[i];
|
||||||
*s++ = test_bit(i, &tainted_mask) ?
|
*s++ = test_bit(i, &tainted_mask) ?
|
||||||
t->true : t->false;
|
t->c_true : t->c_false;
|
||||||
}
|
}
|
||||||
*s = 0;
|
*s = 0;
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in New Issue