diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.debug | 14 | ||||
| -rw-r--r-- | lib/digsig.c | 6 | ||||
| -rw-r--r-- | lib/flex_proportions.c | 2 |
3 files changed, 19 insertions, 3 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 2403a63b5da5..dacbbe4d7a80 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -629,6 +629,20 @@ config PROVE_RCU_REPEATEDLY | |||
| 629 | 629 | ||
| 630 | Say N if you are unsure. | 630 | Say N if you are unsure. |
| 631 | 631 | ||
| 632 | config PROVE_RCU_DELAY | ||
| 633 | bool "RCU debugging: preemptible RCU race provocation" | ||
| 634 | depends on DEBUG_KERNEL && PREEMPT_RCU | ||
| 635 | default n | ||
| 636 | help | ||
| 637 | There is a class of races that involve an unlikely preemption | ||
| 638 | of __rcu_read_unlock() just after ->rcu_read_lock_nesting has | ||
| 639 | been set to INT_MIN. This feature inserts a delay at that | ||
| 640 | point to increase the probability of these races. | ||
| 641 | |||
| 642 | Say Y to increase probability of preemption of __rcu_read_unlock(). | ||
| 643 | |||
| 644 | Say N if you are unsure. | ||
| 645 | |||
| 632 | config SPARSE_RCU_POINTER | 646 | config SPARSE_RCU_POINTER |
| 633 | bool "RCU debugging: sparse-based checks for pointer usage" | 647 | bool "RCU debugging: sparse-based checks for pointer usage" |
| 634 | default n | 648 | default n |
diff --git a/lib/digsig.c b/lib/digsig.c index 286d558033e2..8c0e62975c88 100644 --- a/lib/digsig.c +++ b/lib/digsig.c | |||
| @@ -163,9 +163,11 @@ static int digsig_verify_rsa(struct key *key, | |||
| 163 | memcpy(out1 + head, p, l); | 163 | memcpy(out1 + head, p, l); |
| 164 | 164 | ||
| 165 | err = pkcs_1_v1_5_decode_emsa(out1, len, mblen, out2, &len); | 165 | err = pkcs_1_v1_5_decode_emsa(out1, len, mblen, out2, &len); |
| 166 | if (err) | ||
| 167 | goto err; | ||
| 166 | 168 | ||
| 167 | if (!err && len == hlen) | 169 | if (len != hlen || memcmp(out2, h, hlen)) |
| 168 | err = memcmp(out2, h, hlen); | 170 | err = -EINVAL; |
| 169 | 171 | ||
| 170 | err: | 172 | err: |
| 171 | mpi_free(in); | 173 | mpi_free(in); |
diff --git a/lib/flex_proportions.c b/lib/flex_proportions.c index c785554f9523..ebf3bac460b0 100644 --- a/lib/flex_proportions.c +++ b/lib/flex_proportions.c | |||
| @@ -62,7 +62,7 @@ void fprop_global_destroy(struct fprop_global *p) | |||
| 62 | */ | 62 | */ |
| 63 | bool fprop_new_period(struct fprop_global *p, int periods) | 63 | bool fprop_new_period(struct fprop_global *p, int periods) |
| 64 | { | 64 | { |
| 65 | u64 events; | 65 | s64 events; |
| 66 | unsigned long flags; | 66 | unsigned long flags; |
| 67 | 67 | ||
| 68 | local_irq_save(flags); | 68 | local_irq_save(flags); |
