Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f14aa871 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branches 'core-urgent-for-linus' and 'irq-urgent-for-linus' of...

Merge branches 'core-urgent-for-linus' and 'irq-urgent-for-linus' of 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
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -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)
static int irq_wait_for_interrupt(struct irqaction *action)
{
{
	while (!kthread_should_stop()) {
	set_current_state(TASK_INTERRUPTIBLE);
	set_current_state(TASK_INTERRUPTIBLE);


	while (!kthread_should_stop()) {

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


+4 −1
Original line number Original line Diff line number Diff line
@@ -595,6 +595,7 @@ static enum {
	PARTIAL_AC,
	PARTIAL_AC,
	PARTIAL_L3,
	PARTIAL_L3,
	EARLY,
	EARLY,
	LATE,
	FULL
	FULL
} g_cpucache_up;
} g_cpucache_up;


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


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


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


	g_cpucache_up = LATE;

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