]> git.baikalelectronics.ru Git - kernel.git/commit
genirq/affinity: Don't return with empty affinity masks on error
authorThomas Gleixner <tglx@linutronix.de>
Wed, 4 Apr 2018 10:40:07 +0000 (12:40 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 6 Apr 2018 10:19:50 +0000 (12:19 +0200)
commit67a6d605a7d303f6bf8be250452e66ef22e0bb96
tree7565018404d1075b968f69ee4e90b2bf5b9cf981
parent6e30ec4884d1501644ee126b77a24062ef66f625
genirq/affinity: Don't return with empty affinity masks on error

When the allocation of node_to_possible_cpumask fails, then
irq_create_affinity_masks() returns with a pointer to the empty affinity
masks array, which will cause malfunction.

Reorder the allocations so the masks array allocation comes last and every
failure path returns NULL.

Fixes: 7452591af523 ("genirq/affinity: Assign vectors to all present CPUs")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Ming Lei <ming.lei@redhat.com>
kernel/irq/affinity.c