]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast()
authorEric Dumazet <edumazet@google.com>
Tue, 10 Mar 2020 01:22:58 +0000 (18:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Mar 2020 01:32:03 +0000 (18:32 -0700)
Commit b47ecf1107dd ("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: b47ecf1107dd ("ipvlan: add cond_resched_rcu() while processing muticast backlog")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipvlan/ipvlan_core.c

index 5759e91dec7105cb6d27ce8b4e47eae26f711ad5..8801d093135c3e72ca22643a8fbc7bf896727e4b 100644 (file)
@@ -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();
        }
 }