mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
ipv4/route: Use this_cpu_inc() for stats on PREEMPT_RT
[ Upstream commit 1c0829788a6e6e165846b9bedd0b908ef16260b6 ] The statistics are incremented with raw_cpu_inc() assuming it always happens with bottom half disabled. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this is no longer true. Use this_cpu_inc() on PREEMPT_RT for the increment to not worry about preemption. Cc: David Ahern <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
bcaf3c2f06
commit
de9b7586f9
1 changed files with 4 additions and 0 deletions
|
|
@ -197,7 +197,11 @@ const __u8 ip_tos2prio[16] = {
|
|||
EXPORT_SYMBOL(ip_tos2prio);
|
||||
|
||||
static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat);
|
||||
#ifndef CONFIG_PREEMPT_RT
|
||||
#define RT_CACHE_STAT_INC(field) raw_cpu_inc(rt_cache_stat.field)
|
||||
#else
|
||||
#define RT_CACHE_STAT_INC(field) this_cpu_inc(rt_cache_stat.field)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
static void *rt_cache_seq_start(struct seq_file *seq, loff_t *pos)
|
||||
|
|
|
|||
Loading…
Reference in a new issue