Skip to content
  • Neil Horman's avatar
    bonding: Fix bonding drivers improper modification of netpoll structure · c2355e1a
    Neil Horman authored
    
    
    The bonding driver currently modifies the netpoll structure in its xmit path
    while sending frames from netpoll.  This is racy, as other cpus can access the
    netpoll structure in parallel. Since the bonding driver points np->dev to a
    slave device, other cpus can inadvertently attempt to send data directly to
    slave devices, leading to improper locking with the bonding master, lost frames,
    and deadlocks.  This patch fixes that up.
    
    This patch also removes the real_dev pointer from the netpoll structure as that
    data is really only used by bonding in the poll_controller, and we can emulate
    its behavior by check each slave for IS_UP.
    
    Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c2355e1a