Return-Path: Date: Thu, 11 Aug 2011 18:05:33 -0300 From: Gustavo Padovan To: Peter Hurley Cc: linux-bluetooth , Jaikumar Ganesh Subject: Re: [PATCH v2] Bluetooth: bnep: Fix deadlock in session deletion Message-ID: <20110811210532.GC19699@joana> References: <1312555295.2172.2.camel@THOR> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1312555295.2172.2.camel@THOR> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Peter, * Peter Hurley [2011-08-05 10:41:35 -0400]: > Commit f4d7cd4a4c introduced the usage of kthread API. > kthread_stop is a blocking function which returns only when > the thread exits. In this case, the thread can't exit because it's > waiting for the write lock, which is being held by bnep_del_connection() > which is waiting for the thread to exit -- deadlock. > > Use atomic_t/wake_up_process instead to signal to the thread to exit. > > Signed-off-by: Jaikumar Ganesh > Signed-off-by: Peter Hurley > --- > net/bluetooth/bnep/bnep.h | 1 + > net/bluetooth/bnep/core.c | 9 +++++---- > 2 files changed, 6 insertions(+), 4 deletions(-) Applied, thanks. Gustavo