* [PATCH net] ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast()
@ 2020-03-10 1:22 Eric Dumazet
2020-03-10 1:33 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2020-03-10 1:22 UTC (permalink / raw)
To: David S . Miller; +Cc: netdev, Eric Dumazet, Eric Dumazet, Mahesh Bandewar
Commit e18b353f102e ("ipvlan: add cond_resched_rcu() while
processing muticast backlog") added a cond_resched_rcu() in a loop
using rcu protection to iterate over slaves.
This is breaking rcu rules, so lets instead use cond_resched()
at a point we can reschedule
Fixes: e18b353f102e ("ipvlan: add cond_resched_rcu() while processing muticast backlog")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Mahesh Bandewar <maheshb@google.com>
---
drivers/net/ipvlan/ipvlan_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c
index 5759e91dec7105cb6d27ce8b4e47eae26f711ad5..8801d093135c3e72ca22643a8fbc7bf896727e4b 100644
--- a/drivers/net/ipvlan/ipvlan_core.c
+++ b/drivers/net/ipvlan/ipvlan_core.c
@@ -277,7 +277,6 @@ void ipvlan_process_multicast(struct work_struct *work)
}
ipvlan_count_rx(ipvlan, len, ret == NET_RX_SUCCESS, true);
local_bh_enable();
- cond_resched_rcu();
}
rcu_read_unlock();
@@ -294,6 +293,7 @@ void ipvlan_process_multicast(struct work_struct *work)
}
if (dev)
dev_put(dev);
+ cond_resched();
}
}
--
2.25.1.481.gfbce0eb801-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast()
2020-03-10 1:22 [PATCH net] ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast() Eric Dumazet
@ 2020-03-10 1:33 ` David Miller
2020-03-10 1:58 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2020-03-10 1:33 UTC (permalink / raw)
To: edumazet; +Cc: netdev, eric.dumazet, maheshb
From: Eric Dumazet <edumazet@google.com>
Date: Mon, 9 Mar 2020 18:22:58 -0700
> Commit e18b353f102e ("ipvlan: add cond_resched_rcu() while
> processing muticast backlog") added a cond_resched_rcu() in a loop
> using rcu protection to iterate over slaves.
>
> This is breaking rcu rules, so lets instead use cond_resched()
> at a point we can reschedule
>
> Fixes: e18b353f102e ("ipvlan: add cond_resched_rcu() while processing muticast backlog")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Mahesh Bandewar <maheshb@google.com>
Applied, thanks for the quick fix Eric.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast()
2020-03-10 1:33 ` David Miller
@ 2020-03-10 1:58 ` Eric Dumazet
0 siblings, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2020-03-10 1:58 UTC (permalink / raw)
To: David Miller, edumazet; +Cc: netdev, eric.dumazet, maheshb
On 3/9/20 6:33 PM, David Miller wrote:
> From: Eric Dumazet <edumazet@google.com>
> Date: Mon, 9 Mar 2020 18:22:58 -0700
>
>> Commit e18b353f102e ("ipvlan: add cond_resched_rcu() while
>> processing muticast backlog") added a cond_resched_rcu() in a loop
>> using rcu protection to iterate over slaves.
>>
>> This is breaking rcu rules, so lets instead use cond_resched()
>> at a point we can reschedule
>>
>> Fixes: e18b353f102e ("ipvlan: add cond_resched_rcu() while processing muticast backlog")
>> Signed-off-by: Eric Dumazet <edumazet@google.com>
>> Cc: Mahesh Bandewar <maheshb@google.com>
>
> Applied, thanks for the quick fix Eric.
>
Sure thing ;)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-10 1:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 1:22 [PATCH net] ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast() Eric Dumazet
2020-03-10 1:33 ` David Miller
2020-03-10 1:58 ` Eric Dumazet
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.