Patch "net: mvneta: Fix for_each_present_cpu usage" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
net: mvneta: Fix for_each_present_cpu usage
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-mvneta-fix-for_each_present_cpu-usage.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
129219e4950a3fcf9323b3bbd8b224c7aa873985Mon Sep 17 00:00:00 2001
From: Gregory CLEMENT <[email protected]>
Date: Thu, 4 Feb 2016 22:09:23 +0100
Subject: net: mvneta: Fix for_each_present_cpu usage
From: Gregory CLEMENT <[email protected]>
commit 129219e4950a3fcf9323b3bbd8b224c7aa873985 upstream.
This patch convert the for_each_present in on_each_cpu, instead of applying on the present cpus it will be applied only on the online cpus. This fix a bug reported on
http://thread.gmane.org/gmane.linux.ports.arm.kernel/468173.
Using the macro on_each_cpu (instead of a for_each_* loop) also ensures that all the calls will be done all at once.
--- drivers/net/ethernet/marvell/mvneta.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/net/ethernet/marvell/mvneta.c +3 -5
@@ -2446,7 +2446,7 @@ static void mvneta_start_dev(struct mvnemvneta_port_enable (pp);/* Enable polling on the port */ -for_each_present_cpu (cpu) { +for_each_online_cpu (cpu) {struct mvneta_pcpu_port *port =per_cpu_ptr (pp->ports, cpu);napi_enable (&port->napi);
@@ -2472,7 +2472,7 @@ static void mvneta_stop_dev(struct mvnetphy_stop (pp->phy_dev); -for_each_present_cpu (cpu) { +for_each_online_cpu (cpu) {struct mvneta_pcpu_port *port =per_cpu_ptr (pp->ports, cpu);napi_disable (&port->napi);
@@ -2902,13 +2902,11 @@ err_cleanup_rxqs:static int mvneta_stop (struct net_device *dev) {struct mvneta_port *pp =netdev_priv (dev); -int cpu;mvneta_stop_dev (pp);mvneta_mdio_remove (pp);unregister_cpu_notifier (&pp->cpu_notifier); -for_each_present_cpu (cpu) -smp_call_function_single (cpu, mvneta_percpu_disable, pp, true); +on_each_cpu (mvneta_percpu_disable, pp, true);free_percpu_irq (dev->irq, pp->ports);mvneta_cleanup_rxqs (pp);mvneta_cleanup_txqs (pp);
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/net-mvneta-fix-for_each_present_cpu-usage.patch