• Amerigo Wang's avatar
    bonding: fix potential deadlock in bond_uninit() · 9e2e61fb
    Amerigo Wang authored
    bond_uninit() is invoked with rtnl_lock held, when it does destroy_workqueue()
    which will potentially flush all works in this workqueue, if we hold rtnl_lock
    again in the work function, it will deadlock.
    
    So move destroy_workqueue() to destructor where rtnl_lock is not held any more,
    suggested by Eric.
    Signed-off-by: default avatarWANG Cong <amwang@redhat.com>
    Cc: Jay Vosburgh <fubar@us.ibm.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Stephen Hemminger <shemminger@vyatta.com>
    Cc: Jiri Pirko <jpirko@redhat.com>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9e2e61fb
bond_main.c 133 KB