summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/sysctl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index f69d581d39c3..db1ce7af2563 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -880,10 +880,9 @@ static int proc_taint(struct ctl_table *table, int write,
* Poor man's atomic or. Not worth adding a primitive
* to everyone's atomic.h for this
*/
- for (i = 0; i < BITS_PER_LONG && tmptaint >> i; i++) {
- if ((tmptaint >> i) & 1)
+ for (i = 0; i < TAINT_FLAGS_COUNT; i++)
+ if ((1UL << i) & tmptaint)
add_taint(i, LOCKDEP_STILL_OK);
- }
}
return err;