lkml.org 
[lkml]   [2020]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 4.14 22/28] ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast()
    Date
    From: Eric Dumazet <edumazet@google.com>

    [ Upstream commit afe207d80a61e4d6e7cfa0611a4af46d0ba95628 ]

    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>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    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 91886b5323dff..1d97d6958e4b8 100644
    --- a/drivers/net/ipvlan/ipvlan_core.c
    +++ b/drivers/net/ipvlan/ipvlan_core.c
    @@ -240,7 +240,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();

    @@ -257,6 +256,7 @@ void ipvlan_process_multicast(struct work_struct *work)
    }
    if (dev)
    dev_put(dev);
    + cond_resched();
    }
    }

    --
    2.20.1
    \
     
     \ /
      Last update: 2020-03-18 22:02    [W:4.327 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site