Commit 4f38b4e0 authored by Eric Dumazet's avatar Eric Dumazet Committed by Kelsey Skunberg

ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast()

BugLink: https://bugs.launchpad.net/bugs/1868629

[ Upstream commit afe207d8 ]

Commit e18b353f ("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: e18b353f ("ipvlan: add cond_resched_rcu() while processing muticast backlog")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent 537d38a7
......@@ -240,7 +240,6 @@ void ipvlan_process_multicast(struct work_struct *work)
ret = netif_rx(nskb);
acct:
ipvlan_count_rx(ipvlan, len, ret == NET_RX_SUCCESS, true);
cond_resched_rcu();
}
rcu_read_unlock();
......@@ -252,6 +251,7 @@ void ipvlan_process_multicast(struct work_struct *work)
} else {
kfree_skb(skb);
}
cond_resched();
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment