Commit fb1697933a03ec47d794b38e2a4e3ccc2463fd22
Committed by
Linus Torvalds
1 parent
eea8b54dc0
Exists in
master
and in
20 other branches
[PATCH] modules: mark TAINT_FORCED_RMMOD correctly
Currently TAINT_FORCED_RMMOD is totally unused. Because it is marked as TAINT_FORCED_MODULE instead when user forced a module unload. This patch marks it correctly Signed-off-by: Akinobu Mita <mita@miraclelinux.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 1 changed file with 5 additions and 5 deletions Side-by-side Diff
kernel/module.c
... | ... | @@ -496,15 +496,15 @@ |
496 | 496 | } |
497 | 497 | |
498 | 498 | #ifdef CONFIG_MODULE_FORCE_UNLOAD |
499 | -static inline int try_force(unsigned int flags) | |
499 | +static inline int try_force_unload(unsigned int flags) | |
500 | 500 | { |
501 | 501 | int ret = (flags & O_TRUNC); |
502 | 502 | if (ret) |
503 | - add_taint(TAINT_FORCED_MODULE); | |
503 | + add_taint(TAINT_FORCED_RMMOD); | |
504 | 504 | return ret; |
505 | 505 | } |
506 | 506 | #else |
507 | -static inline int try_force(unsigned int flags) | |
507 | +static inline int try_force_unload(unsigned int flags) | |
508 | 508 | { |
509 | 509 | return 0; |
510 | 510 | } |
... | ... | @@ -524,7 +524,7 @@ |
524 | 524 | |
525 | 525 | /* If it's not unused, quit unless we are told to block. */ |
526 | 526 | if ((sref->flags & O_NONBLOCK) && module_refcount(sref->mod) != 0) { |
527 | - if (!(*sref->forced = try_force(sref->flags))) | |
527 | + if (!(*sref->forced = try_force_unload(sref->flags))) | |
528 | 528 | return -EWOULDBLOCK; |
529 | 529 | } |
530 | 530 | |
... | ... | @@ -609,7 +609,7 @@ |
609 | 609 | /* If it has an init func, it must have an exit func to unload */ |
610 | 610 | if ((mod->init != NULL && mod->exit == NULL) |
611 | 611 | || mod->unsafe) { |
612 | - forced = try_force(flags); | |
612 | + forced = try_force_unload(flags); | |
613 | 613 | if (!forced) { |
614 | 614 | /* This module can't be removed */ |
615 | 615 | ret = -EBUSY; |