Skip to content

Commit

Permalink
Merge branches 'core-urgent-for-linus' and 'irq-urgent-for-linus' of …
Browse files Browse the repository at this point in the history
…git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  slab, lockdep: Fix silly bug

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq: Fix race condition when stopping the irq thread
  • Loading branch information
Linus Torvalds committed Dec 6, 2011
3 parents 7125fac + 52cef18 + 550acb1 commit f14aa87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,16 +623,19 @@ static irqreturn_t irq_nested_primary_handler(int irq, void *dev_id)

static int irq_wait_for_interrupt(struct irqaction *action)
{
set_current_state(TASK_INTERRUPTIBLE);

while (!kthread_should_stop()) {
set_current_state(TASK_INTERRUPTIBLE);

if (test_and_clear_bit(IRQTF_RUNTHREAD,
&action->thread_flags)) {
__set_current_state(TASK_RUNNING);
return 0;
}
schedule();
set_current_state(TASK_INTERRUPTIBLE);
}
__set_current_state(TASK_RUNNING);
return -1;
}

Expand Down
5 changes: 4 additions & 1 deletion mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ static enum {
PARTIAL_AC,
PARTIAL_L3,
EARLY,
LATE,
FULL
} g_cpucache_up;

Expand Down Expand Up @@ -671,7 +672,7 @@ static void init_node_lock_keys(int q)
{
struct cache_sizes *s = malloc_sizes;

if (g_cpucache_up != FULL)
if (g_cpucache_up < LATE)
return;

for (s = malloc_sizes; s->cs_size != ULONG_MAX; s++) {
Expand Down Expand Up @@ -1666,6 +1667,8 @@ void __init kmem_cache_init_late(void)
{
struct kmem_cache *cachep;

g_cpucache_up = LATE;

/* Annotate slab for lockdep -- annotate the malloc caches */
init_lock_keys();

Expand Down

0 comments on commit f14aa87

Please sign in to comment.