From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <20091020133610.GA14042@jh-x301> References: <1255696908.12027.15.camel@walmis-laptop> <20091020133610.GA14042@jh-x301> Date: Tue, 20 Oct 2009 16:57:42 -0300 Message-ID: <2d5a2c100910201257g45d802cia7719035874c5a3d@mail.gmail.com> Subject: Re: Corruption in bluetoothd if started when adapter was rfkilled From: Luiz Augusto von Dentz To: =?ISO-8859-13?Q?Valmantas_Palik=F0a?= , linux-bluetooth@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi, On Tue, Oct 20, 2009 at 10:38 AM, Johan Hedberg wrote: > Hi, > > On Fri, Oct 16, 2009, Valmantas Palikša wrote: >> Steps to reproduce: >> 1. rfkill block bluetooth >> 2. start bluetoothd >> 3. kill bluetoothd > > I don't seem to have rfkill support (at least using that command) on my > laptop so I can't verify this fix, but could you try the attached patch > and see if it resolves the issue? The problem seems to be that in this use > case we never load/probe the adapter drivers but still call their remove > callbacks when the adapter initialization fails. This causes some drivers > to call btd_adapter_unref on adapter objects for which they do not own a > reference. Yep, it fixes the problem. -- Luiz Augusto von Dentz Engenheiro de Computação