• dingtianhong's avatar
    bonding: Fix deadlock in bonding driver when using netpoll · f80889a5
    dingtianhong authored
    The bonding driver take write locks and spin locks that are shared
    by the tx path in enslave processing and notification processing,
    If the netconsole is in use, the bonding can call printk which puts
    us in the netpoll tx path, if the netconsole is attached to the bonding
    driver, result in deadlock.
    
    So add protection for these place, by checking the netpoll_block_tx
    state, we can defer the sending of the netconsole frames until a later
    time using the retransmit feature of netpoll_send_skb that is triggered
    on the return code NETDEV_TX_BUSY.
    
    Cc: Jay Vosburgh <fubar@us.ibm.com>
    Cc: Veaceslav Falico <vfalico@redhat.com>
    Cc: Andy Gospodarek <andy@greyhouse.net>
    Signed-off-by: default avatarDing Tianhong <dingtianhong@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f80889a5
bond_main.c 124 KB