Florian Fainelli
9fb20801da
net: Fix ip_mc_{dec,inc}_group allocation context
After 4effd28c1245 ("bridge: join all-snoopers multicast address"), I
started seeing the following sleep in atomic warnings:
[ 26.763893] BUG: sleeping function called from invalid context at mm/slab.h:421
[ 26.771425] in_atomic(): 1, irqs_disabled(): 0, pid: 1658, name: sh
[ 26.777855] INFO: lockdep is turned off.
[ 26.781916] CPU: 0 PID: 1658 Comm: sh Not tainted 5.0.0-rc4 #20
[ 26.787943] Hardware name: BCM97278SV (DT)
[ 26.792118] Call trace:
[ 26.794645] dump_backtrace+0x0/0x170
[ 26.798391] show_stack+0x24/0x30
[ 26.801787] dump_stack+0xa4/0xe4
[ 26.805182] ___might_sleep+0x208/0x218
[ 26.809102] __might_sleep+0x78/0x88
[ 26.812762] kmem_cache_alloc_trace+0x64/0x28c
[ 26.817301] igmp_group_dropped+0x150/0x230
[ 26.821573] ip_mc_dec_group+0x1b0/0x1f8
[ 26.825585] br_ip4_multicast_leave_snoopers.isra.11+0x174/0x190
[ 26.831704] br_multicast_toggle+0x78/0xcc
[ 26.835887] store_bridge_parm+0xc4/0xfc
[ 26.839894] multicast_snooping_store+0x3c/0x4c
[ 26.844517] dev_attr_store+0x44/0x5c
[ 26.848262] sysfs_kf_write+0x50/0x68
[ 26.852006] kernfs_fop_write+0x14c/0x1b4
[ 26.856102] __vfs_write+0x60/0x190
[ 26.859668] vfs_write+0xc8/0x168
[ 26.863059] ksys_write+0x70/0xc8
[ 26.866449] __arm64_sys_write+0x24/0x30
[ 26.870458] el0_svc_common+0xa0/0x11c
[ 26.874291] el0_svc_handler+0x38/0x70
[ 26.878120] el0_svc+0x8/0xc
while toggling the bridge's multicast_snooping attribute dynamically.
Pass a gfp_t down to igmpv3_add_delrec(), introduce
__igmp_group_dropped() and introduce __ip_mc_dec_group() to take a gfp_t
argument.
Similarly introduce ____ip_mc_inc_group() and __ip_mc_inc_group() to
allow caller to specify gfp_t.
IPv6 part of the patch appears fine.
Fixes: 4effd28c1245 ("bridge: join all-snoopers multicast address")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-03 12:11:12 -08:00
..
2019-01-11 18:05:41 -08:00
2019-01-29 21:18:54 -08:00
2018-12-15 13:23:02 -08:00
2018-09-26 20:30:55 -07:00
2018-10-12 09:47:39 -07:00
2018-09-17 19:37:46 -07:00
2018-10-02 22:28:17 -07:00
2019-01-22 11:07:21 -08:00
2018-12-19 11:21:37 -08:00
2018-12-19 11:21:37 -08:00
2019-01-15 13:33:44 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-12-30 12:57:04 -08:00
2019-02-01 15:12:29 -08:00
2019-01-15 13:33:44 -08:00
2019-01-15 22:01:31 -08:00
2019-01-22 11:52:17 -08:00
2018-07-03 10:29:26 +09:00
2018-11-08 17:13:08 -08:00
2019-02-03 12:11:12 -08:00
2018-11-07 22:31:07 -08:00
2018-12-20 19:23:22 -08:00
2019-01-25 21:37:11 -08:00
2018-12-24 15:27:56 -08:00
2018-04-07 22:32:32 -04:00
2018-04-09 10:57:35 -04:00
2018-12-20 11:53:36 -08:00
2019-01-25 21:37:11 -08:00
2019-01-27 10:43:17 -08:00
2019-01-27 13:27:50 -08:00
2017-11-02 11:10:55 +01:00
2018-12-19 11:21:37 -08:00
2019-01-10 09:27:20 -05:00
2018-12-24 16:19:56 -08:00
2019-01-27 10:43:17 -08:00
2019-01-09 14:00:37 +01:00
2018-09-26 20:30:55 -07:00
2019-02-01 15:24:13 -08:00
2019-01-26 09:43:03 -08:00
2018-10-19 11:03:06 -07:00
2019-01-19 10:09:58 -08:00
2018-07-24 14:10:43 -07:00
2018-10-15 12:23:19 -07:00
2018-11-06 15:00:45 -08:00
2019-01-28 11:32:58 +01:00
2018-05-23 15:14:12 -04:00
2018-10-02 22:28:17 -07:00
2018-11-30 13:26:54 -08:00
2018-11-08 17:13:08 -08:00
2017-08-07 11:39:22 -07:00
2018-12-20 11:53:36 -08:00
2019-02-03 09:54:05 -08:00
2018-09-21 19:37:59 -07:00
2018-11-07 16:12:38 -08:00
2019-01-24 22:27:27 -08:00
2017-08-06 21:25:10 -07:00
2018-12-20 23:47:09 +01:00
2018-10-15 22:56:42 -07:00
2017-11-15 14:09:52 +09:00
2017-08-06 21:25:10 -07:00
2018-10-10 22:26:00 -07:00
2018-10-10 22:26:00 -07:00
2017-12-20 14:00:25 -05:00
2017-12-13 15:51:12 -05:00
2017-08-06 21:25:10 -07:00
2017-08-06 21:25:10 -07:00
2016-11-21 13:20:17 -05:00
2018-02-28 12:03:47 -05:00
2019-01-27 13:29:43 -08:00
2019-01-27 13:29:43 -08:00
2017-05-17 16:06:01 -04:00
2018-12-28 12:11:47 -08:00
2019-01-17 22:19:05 -08:00
2018-01-31 10:26:30 -05:00
2018-12-15 13:23:02 -08:00
2019-01-27 13:29:43 -08:00
2018-09-21 19:37:59 -07:00
2018-09-21 19:37:59 -07:00
2017-08-06 21:25:10 -07:00
2019-01-27 13:29:43 -08:00
2018-10-16 12:38:41 -07:00
2017-09-29 06:07:00 +01:00
2017-11-02 11:10:55 +01:00
2017-08-06 21:25:10 -07:00
2017-08-30 11:20:08 -07:00
2017-08-06 21:25:10 -07:00
2019-02-03 11:17:31 -08:00
2018-11-08 17:13:08 -08:00
2018-10-28 19:27:21 -07:00
2019-01-17 15:01:08 -08:00
2018-12-15 13:23:02 -08:00
2019-01-17 14:55:52 -08:00
2019-01-17 15:01:08 -08:00
2019-01-17 15:01:08 -08:00
2018-09-04 10:26:30 +02:00
2017-06-16 11:48:39 -04:00
2018-09-04 10:26:30 +02:00
2018-03-07 10:54:29 +01:00
2018-03-04 17:49:17 -05:00
2018-03-27 13:18:09 -04:00
2018-11-08 17:13:08 -08:00
2017-11-02 11:10:55 +01:00