diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/manage.c | 3 | ||||
-rw-r--r-- | kernel/profile.c | 3 | ||||
-rw-r--r-- | kernel/sys.c | 15 |
3 files changed, 16 insertions, 5 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index b385878c6e80..8b961adc3bd2 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -315,6 +315,9 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
315 | /* Undo nested disables: */ | 315 | /* Undo nested disables: */ |
316 | desc->depth = 1; | 316 | desc->depth = 1; |
317 | } | 317 | } |
318 | /* Reset broken irq detection when installing new handler */ | ||
319 | desc->irq_count = 0; | ||
320 | desc->irqs_unhandled = 0; | ||
318 | spin_unlock_irqrestore(&desc->lock, flags); | 321 | spin_unlock_irqrestore(&desc->lock, flags); |
319 | 322 | ||
320 | new->irq = irq; | 323 | new->irq = irq; |
diff --git a/kernel/profile.c b/kernel/profile.c index a6574a18514e..d6579d511069 100644 --- a/kernel/profile.c +++ b/kernel/profile.c | |||
@@ -331,7 +331,6 @@ out: | |||
331 | local_irq_restore(flags); | 331 | local_irq_restore(flags); |
332 | put_cpu(); | 332 | put_cpu(); |
333 | } | 333 | } |
334 | EXPORT_SYMBOL_GPL(profile_hits); | ||
335 | 334 | ||
336 | static int __devinit profile_cpu_callback(struct notifier_block *info, | 335 | static int __devinit profile_cpu_callback(struct notifier_block *info, |
337 | unsigned long action, void *__cpu) | 336 | unsigned long action, void *__cpu) |
@@ -401,6 +400,8 @@ void profile_hits(int type, void *__pc, unsigned int nr_hits) | |||
401 | } | 400 | } |
402 | #endif /* !CONFIG_SMP */ | 401 | #endif /* !CONFIG_SMP */ |
403 | 402 | ||
403 | EXPORT_SYMBOL_GPL(profile_hits); | ||
404 | |||
404 | void profile_tick(int type) | 405 | void profile_tick(int type) |
405 | { | 406 | { |
406 | struct pt_regs *regs = get_irq_regs(); | 407 | struct pt_regs *regs = get_irq_regs(); |
diff --git a/kernel/sys.c b/kernel/sys.c index c7675c1bfdf2..6e2101dec0fc 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -323,11 +323,18 @@ EXPORT_SYMBOL_GPL(blocking_notifier_chain_unregister); | |||
323 | int blocking_notifier_call_chain(struct blocking_notifier_head *nh, | 323 | int blocking_notifier_call_chain(struct blocking_notifier_head *nh, |
324 | unsigned long val, void *v) | 324 | unsigned long val, void *v) |
325 | { | 325 | { |
326 | int ret; | 326 | int ret = NOTIFY_DONE; |
327 | 327 | ||
328 | down_read(&nh->rwsem); | 328 | /* |
329 | ret = notifier_call_chain(&nh->head, val, v); | 329 | * We check the head outside the lock, but if this access is |
330 | up_read(&nh->rwsem); | 330 | * racy then it does not matter what the result of the test |
331 | * is, we re-check the list after having taken the lock anyway: | ||
332 | */ | ||
333 | if (rcu_dereference(nh->head)) { | ||
334 | down_read(&nh->rwsem); | ||
335 | ret = notifier_call_chain(&nh->head, val, v); | ||
336 | up_read(&nh->rwsem); | ||
337 | } | ||
331 | return ret; | 338 | return ret; |
332 | } | 339 | } |
333 | 340 | ||