ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast()
Subsystems (2)
PATCH 1/1 ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast()
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
--- drivers/net/ipvlan/ipvlan_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ipvlan/ipvlan_core.c +1 -1
@@ -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 (); } }
Signature · 1 line
2.25.1.481.gfbce0eb801-goog
From: Eric Dumazet <[email protected]>
Date: Mon, 9 Mar 2020 18:22:58 -0700
Quoted 10 lines
Commit
e18b353f102e("ipvlan: addcond_resched_rcu()while processing muticast backlog") added acond_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 rescheduleFixes e18b353f102e ("ipvlan: add cond_resched_rcu() while processing muticast backlog")Signed-off-by Eric Dumazet <[email protected]>Cc Mahesh Bandewar <[email protected]>
Applied, thanks for the quick fix Eric.
Quoted 7 lines · David Miller
From: Eric Dumazet <[email protected]>
Date: Mon, 9 Mar 2020 18:22:58 -0700Quoted 4 lines
Commit
e18b353f102e("ipvlan: addcond_resched_rcu()while processing muticast backlog") added acond_resched_rcu()in a loop using rcu protection to iterate over slaves.
Quoted 9 lines
Quoted 6 lines
This is breaking rcu rules, so lets instead use
cond_resched()at a point we can rescheduleFixes e18b353f102e ("ipvlan: add cond_resched_rcu() while processing muticast backlog")Signed-off-by Eric Dumazet <[email protected]>Cc Mahesh Bandewar <[email protected]>Applied, thanks for the quick fix Eric.
Sure thing ;)