]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: Fix affinity hint allocation
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 30 Oct 2018 15:41:00 +0000 (15:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Oct 2018 18:34:41 +0000 (11:34 -0700)
commit66f91b1a32f154c03580c581fc434b3d8dfb3f42
tree70678737b1a35921b4ef7d4f07d54105302976cb
parent6ab2e1e3615216fedb5099279fc8a78e9b898154
net: mvpp2: Fix affinity hint allocation

The mvpp2 driver has the curious behaviour of passing a stack variable
to irq_set_affinity_hint(), which results in the kernel exploding
the first time anyone accesses this information. News flash: userspace
does, and irqbalance will happily take the machine down. Great stuff.

An easy fix is to track the mask within the queue_vector structure,
and to make sure it has the same lifetime as the interrupt itself.

Fixes: b9ccba6e89b1 ("net: mvpp2: handle cases where more CPUs are available than s/w threads")
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2.h
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c