* Patch "net/mlx5e: Disable preemption when doing TC statistics upcall" has been added to the 4.9-stable tree
@ 2017-02-23 20:17 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-02-23 20:17 UTC (permalink / raw)
To: ogerlitz, davem, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
net/mlx5e: Disable preemption when doing TC statistics upcall
to the 4.9-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-mlx5e-disable-preemption-when-doing-tc-statistics-upcall.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Thu Feb 23 21:13:05 CET 2017
From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Sun, 12 Feb 2017 11:21:31 +0200
Subject: net/mlx5e: Disable preemption when doing TC statistics upcall
From: Or Gerlitz <ogerlitz@mellanox.com>
[ Upstream commit fed06ee89b78d3af32e235e0e89ad0d946fcb95d ]
When called by HW offloading drivers, the TC action (e.g
net/sched/act_mirred.c) code uses this_cpu logic, e.g
_bstats_cpu_update(this_cpu_ptr(a->cpu_bstats), bytes, packets)
per the kernel documention, preemption should be disabled, add that.
Before the fix, when running with CONFIG_PREEMPT set, we get a
BUG: using smp_processor_id() in preemptible [00000000] code: tc/3793
asserion from the TC action (mirred) stats_update callback.
Fixes: aad7e08d39bd ('net/mlx5e: Hardware offloaded flower filter statistics support')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -567,10 +567,14 @@ int mlx5e_stats_flower(struct mlx5e_priv
mlx5_fc_query_cached(counter, &bytes, &packets, &lastuse);
+ preempt_disable();
+
tcf_exts_to_list(f->exts, &actions);
list_for_each_entry(a, &actions, list)
tcf_action_stats_update(a, bytes, packets, lastuse);
+ preempt_enable();
+
return 0;
}
Patches currently in stable-queue which might be from ogerlitz@mellanox.com are
queue-4.9/net-mlx5e-disable-preemption-when-doing-tc-statistics-upcall.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-23 20:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-23 20:17 Patch "net/mlx5e: Disable preemption when doing TC statistics upcall" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).