aboutsummaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@free-electrons.com>2016-02-04 22:09:24 +0100
committerDavid S. Miller <davem@davemloft.net>2016-02-13 06:02:18 -0500
commitcad5d847a093077b499a8b0bbfe6804b9226c03e (patch)
treea1355e0c243c7b4ebbb52c7a0ce3d1c93f7a1edc /net/unix/af_unix.c
parent129219e4950a3fcf9323b3bbd8b224c7aa873985 (diff)
downloadlinux-cad5d847a093077b499a8b0bbfe6804b9226c03e.tar.gz
linux-cad5d847a093077b499a8b0bbfe6804b9226c03e.tar.bz2
linux-cad5d847a093077b499a8b0bbfe6804b9226c03e.zip
net: mvneta: Fix the CPU choice in mvneta_percpu_elect
When passing to the management of multiple RX queue, the mvneta_percpu_elect function was broken. The use of the modulo can lead to elect the wrong cpu. For example with rxq_def=2, if the CPU 2 goes offline and then online, we ended with the third RX queue activated in the same time on CPU 0 and CPU2, which lead to a kernel crash. With this fix, we don't try to get "the closer" CPU if the default CPU is gone, now we just use CPU 0 which always be there. Thanks to this, the code becomes more readable, easier to maintain and more predicable. Cc: stable@vger.kernel.org Fixes: 2dcf75e2793c ("net: mvneta: Associate RX queues with each CPU") Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions