diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/hrtimer.c | 13 | ||||
| -rw-r--r-- | kernel/sysctl_check.c | 9 |
2 files changed, 11 insertions, 11 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 1decafbb6b1a..72206cf5c6cf 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
| @@ -931,6 +931,7 @@ static inline int | |||
| 931 | remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base) | 931 | remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base) |
| 932 | { | 932 | { |
| 933 | if (hrtimer_is_queued(timer)) { | 933 | if (hrtimer_is_queued(timer)) { |
| 934 | unsigned long state; | ||
| 934 | int reprogram; | 935 | int reprogram; |
| 935 | 936 | ||
| 936 | /* | 937 | /* |
| @@ -944,8 +945,13 @@ remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base) | |||
| 944 | debug_deactivate(timer); | 945 | debug_deactivate(timer); |
| 945 | timer_stats_hrtimer_clear_start_info(timer); | 946 | timer_stats_hrtimer_clear_start_info(timer); |
| 946 | reprogram = base->cpu_base == &__get_cpu_var(hrtimer_bases); | 947 | reprogram = base->cpu_base == &__get_cpu_var(hrtimer_bases); |
| 947 | __remove_hrtimer(timer, base, HRTIMER_STATE_INACTIVE, | 948 | /* |
| 948 | reprogram); | 949 | * We must preserve the CALLBACK state flag here, |
| 950 | * otherwise we could move the timer base in | ||
| 951 | * switch_hrtimer_base. | ||
| 952 | */ | ||
| 953 | state = timer->state & HRTIMER_STATE_CALLBACK; | ||
| 954 | __remove_hrtimer(timer, base, state, reprogram); | ||
| 949 | return 1; | 955 | return 1; |
| 950 | } | 956 | } |
| 951 | return 0; | 957 | return 0; |
| @@ -1231,6 +1237,9 @@ static void __run_hrtimer(struct hrtimer *timer, ktime_t *now) | |||
| 1231 | BUG_ON(timer->state != HRTIMER_STATE_CALLBACK); | 1237 | BUG_ON(timer->state != HRTIMER_STATE_CALLBACK); |
| 1232 | enqueue_hrtimer(timer, base); | 1238 | enqueue_hrtimer(timer, base); |
| 1233 | } | 1239 | } |
| 1240 | |||
| 1241 | WARN_ON_ONCE(!(timer->state & HRTIMER_STATE_CALLBACK)); | ||
| 1242 | |||
| 1234 | timer->state &= ~HRTIMER_STATE_CALLBACK; | 1243 | timer->state &= ~HRTIMER_STATE_CALLBACK; |
| 1235 | } | 1244 | } |
| 1236 | 1245 | ||
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index 04cdcf72c827..10b90d8a03c4 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c | |||
| @@ -143,15 +143,6 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table) | |||
| 143 | if (!table->maxlen) | 143 | if (!table->maxlen) |
| 144 | set_fail(&fail, table, "No maxlen"); | 144 | set_fail(&fail, table, "No maxlen"); |
| 145 | } | 145 | } |
| 146 | if ((table->proc_handler == proc_doulongvec_minmax) || | ||
| 147 | (table->proc_handler == proc_doulongvec_ms_jiffies_minmax)) { | ||
| 148 | if (table->maxlen > sizeof (unsigned long)) { | ||
| 149 | if (!table->extra1) | ||
| 150 | set_fail(&fail, table, "No min"); | ||
| 151 | if (!table->extra2) | ||
| 152 | set_fail(&fail, table, "No max"); | ||
| 153 | } | ||
| 154 | } | ||
| 155 | #ifdef CONFIG_PROC_SYSCTL | 146 | #ifdef CONFIG_PROC_SYSCTL |
| 156 | if (table->procname && !table->proc_handler) | 147 | if (table->procname && !table->proc_handler) |
| 157 | set_fail(&fail, table, "No proc_handler"); | 148 | set_fail(&fail, table, "No proc_handler"); |
