• Jarod Wilson's avatar
    bonding: don't need RTNL for ipsec helpers · f548a476
    Jarod Wilson authored
    The bond_ipsec_* helpers don't need RTNL, and can potentially get called
    without it being held, so switch from rtnl_dereference() to
    rcu_dereference() to access bond struct data.
    
    Lightly tested with xfrm bonding, no problems found, should address the
    syzkaller bug referenced below.
    
    Reported-by: syzbot+582c98032903dcc04816@syzkaller.appspotmail.com
    CC: Huy Nguyen <huyn@mellanox.com>
    CC: Saeed Mahameed <saeedm@mellanox.com>
    CC: Jay Vosburgh <j.vosburgh@gmail.com>
    CC: Veaceslav Falico <vfalico@gmail.com>
    CC: Andy Gospodarek <andy@greyhouse.net>
    CC: "David S. Miller" <davem@davemloft.net>
    CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
    CC: Jakub Kicinski <kuba@kernel.org>
    CC: Steffen Klassert <steffen.klassert@secunet.com>
    CC: Herbert Xu <herbert@gondor.apana.org.au>
    CC: netdev@vger.kernel.org
    CC: intel-wired-lan@lists.osuosl.org
    Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f548a476
bond_main.c 146 KB