lkml.org 
[lkml]   [2018]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 15/39] bonding: re-evaluate force_primary when the primary slave name changes
    Date
    4.9-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Xiangning Yu <yuxiangning@gmail.com>

    [ Upstream commit eb55bbf865d9979098c6a7a17cbdb41237ece951 ]

    There is a timing issue under active-standy mode, when bond_enslave() is
    called, bond->params.primary might not be initialized yet.

    Any time the primary slave string changes, bond->force_primary should be
    set to true to make sure the primary becomes the active slave.

    Signed-off-by: Xiangning Yu <yuxiangning@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/net/bonding/bond_options.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/net/bonding/bond_options.c
    +++ b/drivers/net/bonding/bond_options.c
    @@ -1114,6 +1114,7 @@ static int bond_option_primary_set(struc
    slave->dev->name);
    rcu_assign_pointer(bond->primary_slave, slave);
    strcpy(bond->params.primary, slave->dev->name);
    + bond->force_primary = true;
    bond_select_active_slave(bond);
    goto out;
    }

    \
     
     \ /
      Last update: 2018-06-24 17:57    [W:3.324 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site