Re: [Patch V3] bonding: fix potential deadlock in bond_uninit()

From: David Miller
Date: Thu Apr 01 2010 - 20:26:46 EST


From: Cong Wang <amwang@xxxxxxxxxx>
Date: Thu, 01 Apr 2010 15:30:52 +0800

> Eric W. Biederman wrote:
>> Amerigo Wang <amwang@xxxxxxxxxx> writes:
>>
>>> 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.
>> The error handling on creating a bond device needs to be updated as
>> well.
>>
>
> Done.

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/