genirq: Prevent crash in irq_move_irq()
genirq: Prevent crash in irq_move_irq()

The functions irq_move_irq() and irq_move_masked_irq() expect that the
caller passes the top-level irq_data to them when hierarchical
irqdomains are enabled. But that's not true when called from
apic_ack_edge(), which results in a null pointer dereference by
idata->chip->irq_mask(idata).

Instead of fixing callers to passing top-level irq_data, we rather
change irq_move_irq()/irq_move_masked_irq() to accept any irq_data.

Fixes: 52f518a3a7c 'x86/MSI: Use hierarchical irqdomains to manage MSI interrupts'
Reported-by: Huang Ying <b1ed892af366400004b51f70e40351e33707b6c4@intel.com>
Signed-off-by: Jiang Liu <68ee766e574f18b34b683085865827393efe88bd@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <da3a51b335cef0eb0e2c329c5ef6bcd6acef687a@oracle.com>
Cc: Tony Luck <e7984595ec0368ff920a7b3521dc7093683f6f26@intel.com>
Cc: Bjorn Helgaas <f10ec01be0c6b54271af5c550cd257810bdf3268@google.com>
Cc: Benjamin Herrenschmidt <a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org>
Cc: Randy Dunlap <6f29df8e90a57f1ba61ffd63b0468c86bb6d3a99@infradead.org>
Cc: Yinghai Lu <0674548f4d596393408a51d6287a76ebba2f42aa@kernel.org>
Cc: Borislav Petkov <0691a664b24b6f15b20cd5aee64b72271db08be1@alien8.de>
Link: http://lkml.kernel.org/r/1433145945-789-3-git-send-email-68ee766e574f18b34b683085865827393efe88bd@linux.intel.com
Signed-off-by: Thomas Gleixner <00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs