aboutsummaryrefslogtreecommitdiff
path: root/lib/netdev-notifier-error-inject.c
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2015-12-31 16:30:48 +0000
committerThomas Gleixner <[email protected]>2016-01-15 13:44:00 +0100
commit3716fd27a604d61a91cda47083504971486b80f1 (patch)
tree7c996f0b3da0891e61a62304eb9290159956fd08 /lib/netdev-notifier-error-inject.c
parent95ffeb4b5baca266e1d0d2bc90f1513e6f419cdd (diff)
x86/irq: Check vector allocation early
__assign_irq_vector() uses the vector_cpumask which is assigned by apic->vector_allocation_domain() without doing basic sanity checks. That can result in a situation where the final assignement of a newly found vector fails in apic->cpu_mask_to_apicid_and(). So we have to do rollbacks for no reason. apic->cpu_mask_to_apicid_and() only fails if vector_cpumask & requested_cpumask & cpu_online_mask is empty. Check for this condition right away and if the result is empty try immediately the next possible cpu in the requested mask. So in case of a failure the old setting is unchanged and we can remove the rollback code. Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Borislav Petkov <[email protected]> Tested-by: Joe Lawrence <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jeremiah Mahler <[email protected]> Cc: [email protected] Cc: Guenter Roeck <[email protected]> Cc: [email protected] #4.3+ Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions