From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755308Ab0DBA0l (ORCPT ); Thu, 1 Apr 2010 20:26:41 -0400 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:60835 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753108Ab0DBA0f (ORCPT ); Thu, 1 Apr 2010 20:26:35 -0400 Date: Thu, 01 Apr 2010 17:26:35 -0700 (PDT) Message-Id: <20100401.172635.38081142.davem@davemloft.net> To: amwang@redhat.com Cc: ebiederm@xmission.com, linux-kernel@vger.kernel.org, jpirko@redhat.com, shemminger@vyatta.com, netdev@vger.kernel.org, bonding-devel@lists.sourceforge.net, fubar@us.ibm.com Subject: Re: [Patch V3] bonding: fix potential deadlock in bond_uninit() From: David Miller In-Reply-To: <4BB44BAC.2070304@redhat.com> References: <20100401061014.4815.7341.sendpatchset@localhost.localdomain> <4BB44BAC.2070304@redhat.com> X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Cong Wang Date: Thu, 01 Apr 2010 15:30:52 +0800 > Eric W. Biederman wrote: >> Amerigo Wang 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.