diff options
| author | Florian Westphal <fw@strlen.de> | 2019-04-03 08:28:35 +0200 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2020-06-30 23:17:04 -0400 |
| commit | 3a708efa69237c687ee1bd6a7014b2130db90776 (patch) | |
| tree | e4f7fff9b933ffea2e1fb4160f4f92e99999ad77 /include/linux/netdevice.h | |
| parent | edbe653223915b1deee0c4df909d5da924650cec (diff) | |
net: use correct this_cpu primitive in dev_recursion_level
commit 28b05b92886871bdd8e6a9df73e3a15845fe8ef4 upstream.
syzbot reports:
BUG: using __this_cpu_read() in preemptible code:
caller is dev_recursion_level include/linux/netdevice.h:3052 [inline]
__this_cpu_preempt_check+0x246/0x270 lib/smp_processor_id.c:47
dev_recursion_level include/linux/netdevice.h:3052 [inline]
ip6_skb_dst_mtu include/net/ip6_route.h:245 [inline]
I erronously downgraded a this_cpu_read to __this_cpu_read when
moving dev_recursion_level() around.
Reported-by: syzbot+51471b4aae195285a4a3@syzkaller.appspotmail.com
Fixes: 97cdcf37b57e ("net: place xmit recursion in softnet data")
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/netdevice.h')
| -rw-r--r-- | include/linux/netdevice.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 41beebcc61f4..85dc3497c74f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3001,7 +3001,7 @@ DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data); static inline int dev_recursion_level(void) { - return __this_cpu_read(softnet_data.xmit.recursion); + return this_cpu_read(softnet_data.xmit.recursion); } #define XMIT_RECURSION_LIMIT 10 |
