x86/irq: Retrieve irq data after locking irq_desc
authorThomas Gleixner <tglx@linutronix.de>
Sun, 5 Jul 2015 17:12:35 +0000 (17:12 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 7 Jul 2015 09:54:04 +0000 (11:54 +0200)
commit09cf92b784fae6109450c5d64f9908066d605249
tree5c4dcac5d736a39342f24a4d7d627a2290f54fb1
parentcbb24dc761d95fe39a7a122bb1b298e9604cae15
x86/irq: Retrieve irq data after locking irq_desc

irq_data is protected by irq_desc->lock, so retrieving the irq chip
from irq_data outside the lock is racy vs. an concurrent update. Move
it into the lock held region.

While at it add a comment why the vector walk does not require
vector_lock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: xiao jin <jin.xiao@intel.com>
Cc: Joerg Roedel <jroedel@suse.de>
Cc: Borislav Petkov <bp@suse.de>
Cc: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Link: http://lkml.kernel.org/r/20150705171102.331320612@linutronix.de
arch/x86/kernel/irq.c