Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1725965
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] IRQ, cpu-hotplug: Fix a race between CPU hotplug and IRQ desc alloc/free |
| Date | 2017-09-04 11:30 +0200 |
| Message-ID | <ulVRE-3IJ-9@gated-at.bofh.it> (permalink) |
| References | <ulVoC-3is-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, 4 Sep 2017, Huang, Ying wrote: > diff --git a/kernel/irq/cpuhotplug.c b/kernel/irq/cpuhotplug.c > index 638eb9c83d9f..af9029625271 100644 > --- a/kernel/irq/cpuhotplug.c ry> +++ b/kernel/irq/cpuhotplug.c > @@ -129,10 +129,13 @@ void irq_migrate_all_off_this_cpu(void) > struct irq_desc *desc; > unsigned int irq; > > + irq_lock_sparse(); You cannot take that lock here as irq_migrate_all_off_this_cpu() is called with interrupts disabled. The protection in takedown_cpus() is wrong. Patch below. Thanks, tglx ---- --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -642,13 +642,13 @@ static int takedown_cpu(unsigned int cpu wait_for_completion(&st->done); BUG_ON(st->state != CPUHP_AP_IDLE_DEAD); - /* Interrupts are moved away from the dying cpu, reenable alloc/free */ - irq_unlock_sparse(); - hotplug_cpu__broadcast_tick_pull(cpu); /* This actually kills the CPU. */ __cpu_die(cpu); + /* Interrupts are moved away from the dying cpu, reenable alloc/free */ + irq_unlock_sparse(); + tick_cleanup_dead_cpu(cpu); return 0; }
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] IRQ, cpu-hotplug: Fix a race between CPU hotplug and IRQ desc alloc/free "Huang, Ying" <ying.huang@intel.com> - 2017-09-04 11:00 +0200
Re: [PATCH] IRQ, cpu-hotplug: Fix a race between CPU hotplug and IRQ desc alloc/free Thomas Gleixner <tglx@linutronix.de> - 2017-09-04 11:30 +0200
Re: [PATCH] IRQ, cpu-hotplug: Fix a race between CPU hotplug and IRQ desc alloc/free "Huang\, Ying" <ying.huang@intel.com> - 2017-09-05 01:50 +0200
Re: [PATCH] IRQ, cpu-hotplug: Fix a race between CPU hotplug and IRQ desc alloc/free Thomas Gleixner <tglx@linutronix.de> - 2017-09-05 09:20 +0200
csiph-web