Eric Dumazet
065039c409
macvlan: macvlan_count_rx() needs to be aware of preemption
[ Upstream commit dd4fa1dae9f4847cc1fd78ca468ad69e16e5db3e ]
macvlan_count_rx() can be called from process context, it is thus
necessary to disable preemption before calling u64_stats_update_begin()
syzbot was able to spot this on 32bit arch:
WARNING: CPU: 1 PID: 4632 at include/linux/seqlock.h:271 __seqprop_assert include/linux/seqlock.h:271 [inline]
WARNING: CPU: 1 PID: 4632 at include/linux/seqlock.h:271 __seqprop_assert.constprop.0+0xf0/0x11c include/linux/seqlock.h:269
Modules linked in:
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 4632 Comm: kworker/1:3 Not tainted 5.12.0-rc2-syzkaller #0
Hardware name: ARM-Versatile Express
Workqueue: events macvlan_process_broadcast
Backtrace:
[<82740468>] (dump_backtrace) from [<827406dc>] (show_stack+0x18/0x1c arch/arm/kernel/traps.c:252)
r7:00000080 r6:60000093 r5:00000000 r4:8422a3c4
[<827406c4>] (show_stack) from [<82751b58>] (__dump_stack lib/dump_stack.c:79 [inline])
[<827406c4>] (show_stack) from [<82751b58>] (dump_stack+0xb8/0xe8 lib/dump_stack.c:120)
[<82751aa0>] (dump_stack) from [<82741270>] (panic+0x130/0x378 kernel/panic.c:231)
r7:830209b4 r6:84069ea4 r5:00000000 r4:844350d0
[<82741140>] (panic) from [<80244924>] (__warn+0xb0/0x164 kernel/panic.c:605)
r3:8404ec8c r2:00000000 r1:00000000 r0:830209b4
r7:0000010f
[<80244874>] (__warn) from [<82741520>] (warn_slowpath_fmt+0x68/0xd4 kernel/panic.c:628)
r7:81363f70 r6:0000010f r5:83018e50 r4:00000000
[<827414bc>] (warn_slowpath_fmt) from [<81363f70>] (__seqprop_assert include/linux/seqlock.h:271 [inline])
[<827414bc>] (warn_slowpath_fmt) from [<81363f70>] (__seqprop_assert.constprop.0+0xf0/0x11c include/linux/seqlock.h:269)
r8:5a109000 r7:0000000f r6:a568dac0 r5:89802300 r4:00000001
[<81363e80>] (__seqprop_assert.constprop.0) from [<81364af0>] (u64_stats_update_begin include/linux/u64_stats_sync.h:128 [inline])
[<81363e80>] (__seqprop_assert.constprop.0) from [<81364af0>] (macvlan_count_rx include/linux/if_macvlan.h:47 [inline])
[<81363e80>] (__seqprop_assert.constprop.0) from [<81364af0>] (macvlan_broadcast+0x154/0x26c drivers/net/macvlan.c:291)
r5:89802300 r4:8a927740
[<8136499c>] (macvlan_broadcast) from [<81365020>] (macvlan_process_broadcast+0x258/0x2d0 drivers/net/macvlan.c:317)
r10:81364f78 r9:8a86d000 r8:8a9c7e7c r7:8413aa5c r6:00000000 r5:00000000
r4:89802840
[<81364dc8>] (macvlan_process_broadcast) from [<802696a4>] (process_one_work+0x2d4/0x998 kernel/workqueue.c:2275)
r10:00000008 r9:8404ec98 r8:84367a02 r7:ddfe6400 r6:ddfe2d40 r5:898dac80
r4:8a86d43c
[<802693d0>] (process_one_work) from [<80269dcc>] (worker_thread+0x64/0x54c kernel/workqueue.c:2421)
r10:00000008 r9:8a9c6000 r8:84006d00 r7:ddfe2d78 r6:898dac94 r5:ddfe2d40
r4:898dac80
[<80269d68>] (worker_thread) from [<80271f40>] (kthread+0x184/0x1a4 kernel/kthread.c:292)
r10:85247e64 r9:898dac80 r8:80269d68 r7:00000000 r6:8a9c6000 r5:89a2ee40
r4:8a97bd00
[<80271dbc>] (kthread) from [<80200114>] (ret_from_fork+0x14/0x20 arch/arm/kernel/entry-common.S:158)
Exception stack(0x8a9c7fb0 to 0x8a9c7ff8)
Fixes: 412ca1550c ("macvlan: Move broadcasts into a work queue")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Reported-by: syzbot <syzkaller@googlegroups.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-30 14:45:00 +02:00
..
2015-10-19 17:08:32 +01:00
2016-08-10 11:49:24 +02:00
2021-03-17 16:07:19 +01:00
2019-09-10 10:29:49 +01:00
2015-10-01 12:48:11 -07:00
2015-10-17 21:22:08 -07:00
2015-09-30 19:22:50 +09:00
2015-10-07 18:08:15 +01:00
2018-08-24 13:27:00 +02:00
2019-12-05 15:26:48 +01:00
2015-10-20 18:10:25 +02:00
2019-06-11 12:24:02 +02:00
2015-09-27 17:33:59 -07:00
2016-10-28 03:01:34 -04:00
2017-03-15 09:57:14 +08:00
2021-03-24 10:57:00 +01:00
2018-04-13 19:50:17 +02:00
2020-06-03 08:12:09 +02:00
2018-08-06 16:24:36 +02:00
2020-11-10 10:22:12 +01:00
2020-06-03 08:12:14 +02:00
2015-09-18 21:57:43 +02:00
2018-10-13 09:11:35 +02:00
2015-09-18 21:57:43 +02:00
2015-09-18 21:57:43 +02:00
2015-10-27 11:24:23 +01:00
2020-01-29 10:21:49 +01:00
2015-09-23 17:15:27 +02:00
2015-12-07 14:14:03 -05:00
2020-01-23 08:18:41 +01:00
2020-07-09 09:35:08 +02:00
2015-11-10 15:00:03 -08:00
2020-12-11 13:36:45 +01:00
2021-02-23 13:58:12 +01:00
2020-12-02 08:29:29 +01:00
2021-01-23 15:36:55 +01:00
2015-09-17 10:09:37 -05:00
2019-11-10 11:21:22 +01:00
2016-03-09 15:34:52 -08:00
2019-12-21 10:35:02 +01:00
2015-10-06 12:33:14 +02:00
2015-11-03 17:22:17 -08:00
2018-04-08 11:51:57 +02:00
2015-08-20 14:10:23 -07:00
2019-06-11 12:23:41 +02:00
2021-02-23 13:58:12 +01:00
2019-06-11 12:23:51 +02:00
2020-01-29 10:21:52 +01:00
2020-06-29 20:07:54 -04:00
2019-04-27 09:33:55 +02:00
2019-05-16 19:45:09 +02:00
2015-11-11 09:37:34 -07:00
2015-10-27 15:04:56 +09:00
2015-11-07 10:40:47 -07:00
2021-03-03 16:44:21 +01:00
2015-09-29 13:37:04 -07:00
2020-05-20 08:11:38 +02:00
2018-11-10 07:41:37 -08:00
2015-10-08 04:45:52 -07:00
2017-12-09 18:42:43 +01:00
2019-10-05 12:27:50 +02:00
2018-01-31 12:06:08 +01:00
2017-01-12 11:22:50 +01:00
2020-05-20 08:11:40 +02:00
2015-09-10 18:56:14 -07:00
2016-05-04 14:48:49 -07:00
2019-06-22 08:18:23 +02:00
2016-05-11 11:21:11 +02:00
2015-09-14 11:00:55 +02:00
2015-10-01 02:18:39 +02:00
2015-10-23 17:55:10 +09:00
2019-08-06 18:28:28 +02:00
2019-08-06 18:28:28 +02:00
2015-11-05 19:34:48 -08:00
2021-02-03 23:16:16 +01:00
2018-07-22 14:25:51 +02:00
2021-01-30 13:25:56 +01:00
2020-10-29 09:03:00 +01:00
2015-11-20 16:17:32 -08:00
2016-02-17 12:30:57 -08:00
2015-11-10 12:06:23 +01:00
2017-07-05 14:37:20 +02:00
2015-10-07 17:54:09 +01:00
2015-10-15 00:21:07 +02:00
2019-11-16 10:27:52 +01:00
2019-11-25 15:54:07 +01:00
2020-05-10 10:26:24 +02:00
2018-11-10 07:41:43 -08:00
2020-05-27 16:40:33 +02:00
2017-10-12 11:27:35 +02:00
2019-08-04 09:35:01 +02:00
2015-08-17 16:53:53 +08:00
2015-09-08 15:35:28 -07:00
2018-05-30 07:48:52 +02:00
2017-03-22 12:04:15 +01:00
2015-10-18 10:14:39 -07:00
2020-04-24 07:57:11 +02:00
2016-10-28 03:01:26 -04:00
2015-09-11 14:23:29 +09:00
2021-03-03 16:44:21 +01:00
2020-01-29 10:21:45 +01:00
2016-08-16 09:30:49 +02:00
2015-10-15 13:22:35 +01:00
2015-10-23 17:55:10 +09:00
2018-08-06 16:24:36 +02:00
2019-12-21 10:34:37 +01:00
2020-01-12 11:22:42 +01:00
2015-09-08 15:35:28 -07:00
2015-11-18 16:27:46 -05:00
2019-11-25 15:54:16 +01:00
2018-05-26 08:48:56 +02:00
2019-08-04 09:34:55 +02:00
2021-02-10 09:07:27 +01:00
2020-06-29 20:07:54 -04:00
2015-12-11 11:05:57 -08:00
2015-08-17 12:14:53 -07:00
2015-10-16 08:30:09 +09:00
2019-01-26 09:42:46 +01:00
2015-10-04 11:36:07 +01:00
2019-11-25 15:54:25 +01:00
2017-07-15 11:57:44 +02:00
2018-02-25 11:03:53 +01:00
2015-10-30 01:47:27 -04:00
2018-01-17 09:35:30 +01:00
2020-10-14 09:46:21 +02:00
2020-09-03 11:19:27 +02:00
2017-06-17 06:39:36 +02:00
2018-01-10 09:27:10 +01:00
2015-08-14 16:50:36 -07:00
2015-08-07 22:59:34 -05:00
2016-09-30 10:18:37 +02:00
2017-08-06 19:19:42 -07:00
2021-02-23 13:58:12 +01:00
2021-02-03 23:16:16 +01:00
2015-11-04 18:10:13 -08:00
2017-12-16 10:33:54 +01:00
2015-10-09 07:48:59 -07:00
2020-06-29 20:07:56 -04:00
2019-02-20 10:13:11 +01:00
2019-11-10 11:21:10 +01:00
2019-09-10 10:29:46 +01:00
2016-05-11 11:21:13 +02:00
2019-02-20 10:13:19 +01:00
2020-09-12 11:45:26 +02:00
2015-11-09 15:11:24 -08:00
2020-11-10 10:22:18 +01:00
2020-01-04 13:34:38 +01:00
2015-09-08 15:35:28 -07:00
2015-11-06 17:50:42 -08:00
2021-02-10 09:07:28 +01:00
2018-10-20 09:52:38 +02:00
2020-09-23 08:44:26 +02:00
2015-10-20 17:47:45 +02:00
2015-08-24 14:05:19 +02:00
2016-09-07 08:32:44 +02:00
2018-11-21 09:27:42 +01:00
2021-03-03 16:44:21 +01:00
2020-05-10 10:26:36 +02:00
2015-09-24 20:42:37 +02:00
2016-04-20 15:42:02 +09:00
2020-01-12 11:22:52 +01:00
2015-10-23 05:44:28 -07:00
2021-03-30 14:45:00 +02:00
2019-08-11 12:20:46 +02:00
2020-12-11 13:36:44 +01:00
2015-09-29 16:27:47 -07:00
2015-10-09 07:49:05 -07:00
2019-12-21 10:35:04 +01:00
2018-02-25 11:03:54 +01:00
2021-01-23 15:36:55 +01:00
2021-02-03 23:16:17 +01:00
2015-10-27 08:36:08 +09:00
2015-09-22 12:39:57 +02:00
2015-10-15 00:21:07 +02:00
2015-10-15 00:21:07 +02:00
2015-08-10 23:07:05 -04:00
2018-09-09 20:04:36 +02:00
2015-11-04 11:30:57 -08:00
2015-10-22 00:00:49 +02:00
2015-10-16 22:18:51 +02:00
2015-10-04 12:46:06 +01:00
2015-09-03 15:02:28 -05:00
2018-01-02 20:33:25 +01:00
2016-09-24 10:07:43 +02:00
2015-10-01 15:06:43 +02:00
2015-10-01 02:18:38 +02:00
2015-09-16 15:47:51 +02:00
2015-10-13 19:01:25 +02:00
2015-09-16 15:47:51 +02:00
2015-10-30 10:13:26 +01:00
2019-12-21 10:34:54 +01:00
2018-04-08 11:51:57 +02:00
2017-01-19 20:17:19 +01:00
2019-05-16 19:45:07 +02:00
2018-02-22 15:45:01 +01:00
2020-10-29 09:03:00 +01:00
2015-08-22 14:54:55 +02:00
2018-11-27 16:07:57 +01:00
2018-01-23 19:50:12 +01:00
2015-11-09 15:11:24 -08:00
2016-10-28 03:01:30 -04:00
2015-08-18 15:49:15 -07:00
2015-09-10 13:29:01 -07:00
2015-10-21 15:18:36 +01:00
2017-10-27 10:23:18 +02:00
2020-06-20 10:23:21 +02:00
2015-12-12 10:15:34 -08:00
2015-09-10 13:29:01 -07:00
2020-01-14 20:02:59 +01:00
2020-06-29 20:07:56 -04:00
2020-04-02 19:02:39 +02:00
2015-09-04 16:54:41 -07:00
2018-01-31 12:06:08 +01:00
2020-05-02 17:20:47 +02:00
2015-10-01 15:06:46 +02:00
2015-10-26 09:10:56 +01:00
2020-10-01 11:11:58 +02:00
2020-01-04 13:34:37 +01:00
2017-03-18 19:09:58 +08:00
2017-09-02 07:06:51 +02:00
2015-10-06 11:16:42 -07:00
2019-06-11 12:24:10 +02:00
2020-02-28 15:39:02 +01:00
2015-10-06 11:16:42 -07:00
2018-04-08 11:51:59 +02:00
2015-11-23 09:44:58 +01:00
2020-09-12 11:45:28 +02:00
2015-08-10 14:29:27 +05:30
2015-11-17 15:25:43 -05:00
2015-11-10 12:06:16 +01:00
2017-10-27 10:23:17 +02:00
2015-09-20 19:31:10 -07:00
2017-06-14 13:16:26 +02:00
2016-08-16 09:30:51 +02:00
2017-02-09 08:02:47 +01:00
2015-10-04 12:46:06 +01:00
2015-09-09 17:19:14 -07:00
2015-10-27 18:55:31 -07:00
2018-09-19 22:49:00 +02:00
2020-08-26 10:27:07 +02:00
2017-12-20 10:04:59 +01:00
2015-12-18 14:25:40 -08:00
2017-12-25 14:22:09 +01:00
2017-12-16 10:33:50 +01:00
2018-01-05 15:44:24 +01:00
2020-06-11 09:21:40 +02:00
2019-08-25 10:53:03 +02:00
2015-11-06 17:50:42 -08:00
2017-04-30 05:49:28 +02:00
2015-10-20 22:10:45 +08:00
2016-11-15 07:46:37 +01:00
2016-11-15 07:46:37 +01:00
2018-02-25 11:03:48 +01:00
2015-10-17 21:11:29 -07:00
2020-05-27 16:40:33 +02:00
2019-02-23 09:05:13 +01:00
2021-02-23 13:58:13 +01:00
2015-09-17 17:18:37 -07:00
2015-11-06 19:33:12 +01:00
2015-09-29 20:21:32 +02:00
2015-09-30 01:45:03 -05:00
2015-10-16 18:45:36 +02:00
2017-12-05 11:22:49 +01:00
2017-02-01 08:30:53 +01:00
2015-10-15 16:08:18 -04:00
2016-03-03 15:07:28 -08:00
2015-11-23 21:57:44 -05:00
2015-11-05 19:34:48 -08:00
2018-07-25 10:18:27 +02:00
2015-09-07 15:17:08 -04:00
2015-09-07 15:17:09 -04:00
2015-10-09 10:40:37 -06:00
2016-10-07 15:23:41 +02:00
2015-11-10 17:27:12 -06:00
2015-11-16 09:03:21 +05:30
2015-10-16 22:49:26 +02:00
2015-12-09 09:23:28 -06:00
2015-11-12 11:50:33 -08:00
2015-08-25 11:29:55 -05:00
2021-01-09 13:34:15 +01:00
2015-09-01 09:59:20 +10:00
2015-10-28 10:05:58 -07:00
2017-12-16 10:33:51 +01:00
2015-10-08 05:26:36 -07:00
2015-09-08 15:35:28 -07:00
2020-05-27 16:40:27 +02:00
2015-11-05 19:34:48 -08:00
2015-09-10 13:29:01 -07:00
2017-11-24 08:32:25 +01:00
2015-11-06 17:50:42 -08:00
2015-09-08 15:35:28 -07:00
2015-11-06 17:50:42 -08:00
2018-03-22 09:23:22 +01:00
2020-06-29 20:07:59 -04:00
2015-10-16 22:18:51 +02:00
2015-08-13 15:59:58 -05:00
2016-12-08 07:15:24 +01:00
2020-04-24 07:57:24 +02:00
2018-01-05 15:44:26 +01:00
2017-02-09 08:02:46 +01:00
2015-10-06 11:25:31 -07:00
2016-09-15 08:27:46 +02:00
2017-11-21 09:21:22 +01:00
2015-08-31 14:48:02 -07:00
2018-01-17 09:35:29 +01:00
2017-08-24 17:02:36 -07:00
2020-03-11 07:51:15 +01:00
2015-10-05 05:02:40 +01:00
2015-10-28 04:33:04 +01:00
2015-09-15 02:03:16 +02:00
2015-10-14 02:17:34 +02:00
2015-10-09 17:00:32 -04:00
2020-05-20 08:11:48 +02:00
2015-09-10 13:29:01 -07:00
2016-10-31 04:13:58 -06:00
2020-05-20 08:11:41 +02:00
2018-12-17 21:55:15 +01:00
2015-10-01 09:59:16 -07:00
2015-10-21 14:46:56 -06:00
2020-11-18 18:25:02 +01:00
2017-11-15 17:13:11 +01:00
2020-06-03 08:12:16 +02:00
2015-11-07 01:29:22 +01:00
2015-11-23 09:44:58 +01:00
2019-11-10 11:21:19 +01:00
2017-08-06 19:19:43 -07:00
2015-10-22 08:59:18 -07:00
2015-11-03 11:08:22 -05:00
2019-05-16 19:45:09 +02:00
2019-06-22 08:18:21 +02:00
2015-10-30 11:18:05 +09:00
2015-10-14 14:51:22 -05:00
2020-01-04 13:34:32 +01:00
2019-12-21 10:35:30 +01:00
2018-11-10 07:41:35 -08:00
2020-08-21 10:52:55 +02:00
2015-11-06 17:50:42 -08:00
2015-10-06 11:25:45 -07:00
2020-02-28 15:39:02 +01:00
2019-04-03 06:23:25 +02:00
2019-08-04 09:34:46 +02:00
2015-10-06 11:08:23 -07:00
2015-10-06 11:08:05 -07:00
2015-10-12 19:25:07 +01:00
2019-12-05 15:26:36 +01:00
2015-09-01 09:56:58 +02:00
2019-02-08 11:25:32 +01:00
2019-04-27 09:33:48 +02:00
2016-02-25 12:01:21 -08:00
2015-10-16 15:32:18 -07:00
2015-10-09 07:49:06 -07:00
2015-08-24 14:28:01 -06:00
2021-02-03 23:16:16 +01:00
2015-10-04 12:54:54 +01:00
2015-11-19 16:22:43 +01:00
2018-07-25 10:18:27 +02:00
2015-09-20 17:00:26 -07:00
2020-04-02 19:02:39 +02:00
2016-10-28 03:01:32 -04:00
2020-12-29 13:42:39 +01:00
2017-08-06 19:19:42 -07:00
2020-10-01 11:11:51 +02:00
2019-12-21 10:34:25 +01:00
2016-09-07 08:32:44 +02:00
2018-01-17 09:35:29 +01:00
2016-03-03 15:07:23 -08:00
2020-01-29 10:21:47 +01:00
2019-09-06 10:18:13 +02:00
2020-10-01 11:11:52 +02:00
2017-08-11 09:08:58 -07:00
2018-10-10 08:52:08 +02:00
2016-09-30 10:18:37 +02:00
2019-06-11 12:23:56 +02:00
2016-07-11 09:31:11 -07:00
2015-09-01 08:40:25 -07:00
2015-09-20 19:32:02 -07:00
2015-10-06 11:15:43 -07:00
2015-10-04 20:28:58 +01:00
2015-12-12 10:15:34 -08:00
2015-09-10 13:29:01 -07:00
2021-02-23 13:58:12 +01:00
2015-10-26 10:11:58 +09:00
2018-05-30 07:48:55 +02:00
2019-04-27 09:33:59 +02:00
2018-08-15 17:42:10 +02:00
2015-09-08 15:35:28 -07:00
2019-07-10 09:56:42 +02:00
2015-11-25 15:49:13 +00:00
2016-10-07 15:23:46 +02:00
2021-03-07 11:24:22 +01:00
2015-10-21 14:42:38 -06:00
2018-11-21 09:27:36 +01:00
2020-07-31 16:43:16 +02:00
2016-04-12 09:08:35 -07:00
2019-12-21 10:35:05 +01:00
2015-09-20 22:52:13 -07:00
2015-09-02 10:33:22 +02:00
2020-11-18 18:24:57 +01:00
2019-12-21 10:35:40 +01:00
2018-05-26 08:49:00 +02:00
2015-10-01 09:59:01 -07:00
2015-10-01 09:57:59 -07:00
2015-10-19 01:01:21 +02:00
2017-10-21 17:09:02 +02:00
2020-12-29 13:42:39 +01:00
2015-11-05 19:34:48 -08:00
2020-08-21 10:52:57 +02:00
2017-09-27 11:00:13 +02:00
2020-12-11 13:36:45 +01:00
2015-11-25 15:49:13 +00:00
2021-03-30 14:44:59 +02:00
2020-09-12 11:45:29 +02:00
2016-03-03 15:07:08 -08:00
2016-12-10 19:07:25 +01:00
2015-11-23 09:44:58 +01:00
2016-04-20 15:42:07 +09:00
2020-09-23 08:44:24 +02:00
2015-09-04 16:54:41 -07:00
2015-08-12 17:01:01 +01:00
2018-01-31 12:06:11 +01:00
2017-07-27 15:06:07 -07:00
2015-11-05 11:07:36 +10:00
2018-05-02 07:53:40 -07:00
2018-09-19 22:49:00 +02:00
2018-09-19 22:49:00 +02:00
2020-04-02 19:02:31 +02:00
2015-10-17 22:03:00 -07:00
2019-04-03 06:23:21 +02:00
2019-07-21 09:07:12 +02:00
2020-04-02 19:02:39 +02:00
2015-12-13 14:30:59 -08:00
2015-11-03 20:46:26 +01:00
2018-03-18 11:17:48 +01:00
2016-03-09 15:34:52 -08:00
2015-11-13 20:34:33 -05:00
2015-09-08 15:35:28 -07:00
2015-11-06 17:50:42 -08:00
2021-03-07 11:24:22 +01:00
2015-11-06 17:50:42 -08:00