From: Florian Westphal <fw@strlen•de>
To: <netdev@vger•kernel.org>
Cc: Florian Westphal <fw@strlen•de>,
syzbot+51471b4aae195285a4a3@syzkaller•appspotmail.com
Subject: [PATCH net-next] net: use correct this_cpu primitive in dev_recursion_level
Date: Wed, 3 Apr 2019 08:28:35 +0200 [thread overview]
Message-ID: <20190403062835.23920-1-fw@strlen.de> (raw)
In-Reply-To: <000000000000db3c59058595f0ac@google.com>
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>
---
include/linux/netdevice.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index eb9f05e0863d..521eb869555e 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3049,7 +3049,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
--
2.21.0
next prev parent reply other threads:[~2019-04-03 6:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 22:44 BUG: using __this_cpu_read() in preemptible code in ip6_finish_output syzbot
2019-04-03 1:12 ` syzbot
2019-04-03 6:28 ` Florian Westphal [this message]
2019-04-03 12:18 ` [PATCH net-next] net: use correct this_cpu primitive in dev_recursion_level Eric Dumazet
2019-04-05 0:35 ` David Miller
2019-04-05 7:00 ` BUG: using __this_cpu_read() in preemptible code in ip6_finish_output Krzysztof Kozlowski
2019-04-05 10:08 ` Florian Westphal
2019-04-05 12:36 ` Dmitry Vyukov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190403062835.23920-1-fw@strlen.de \
--to=fw@strlen$(echo .)de \
--cc=netdev@vger$(echo .)kernel.org \
--cc=syzbot+51471b4aae195285a4a3@syzkaller$(echo .)appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox