• N
    bonding: Fix bonding drivers improper modification of netpoll structure · c2355e1a
    Neil Horman 提交于
    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: NNeil Horman <nhorman@tuxdriver.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    c2355e1a
netpoll.h 3.4 KB