Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4094770iog; Tue, 21 Jun 2022 11:54:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uPkoPjUQjFCaLtICBT8DYb+FAHb/DhA4Valddu72KSMkLRl3ByY4hcWka6xME+6UELhsQR X-Received: by 2002:a17:90b:164a:b0:1ec:b990:17bf with SMTP id il10-20020a17090b164a00b001ecb99017bfmr9251591pjb.171.1655837641455; Tue, 21 Jun 2022 11:54:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655837641; cv=none; d=google.com; s=arc-20160816; b=EisMAwOr1KSvICzobXgc2tlvg415ekdelNY2qmvNV6zhgovzz5uMbajhFfcj/AfCv9 iCSuvoTW8YAagOyESFcqWHgFfBPUbQc8B/IIkwaYecOE3GAJraMOwpA5J4HO7XRIREo0 ILW3+qNY+6ctO6ZADeGw/65iXyYBh5FeVIMaBhRKf/h8GgwwVqAqVdKwu/BRSOcSgpVx NuYBcjA284x7b2QT502pDrc3M2tnxpo5EUkl6hAJOujAe9LheBmIsOvs2nHZXSRVhrSZ OW5eeCfP8UVE/8mAe3FqH72GQTTpT/Derx6qVedvMGyulol2haoQvpFIJR9dYf2CEsJh gKtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=LyC2xQZ/J7P7EEp9bZtR/lqMCT8LU/RUU5bcVNVOJp8=; b=hjuVoJffVJ1Sxhob3ww9e4nRfzfpY3M80DYixrw5DSUnRMJWBmIysbmEIVAc266gp8 sUtUgStA98/ZJNUcOPBwNHG4MEf07nffKf+LIkT9A3T0RncsOtZEdC7/1lSni7ZK/77u x/2FLAChTPww6w1SGzNGN8baFaEzXs+vpmpAL4gS7LgZ8f/TEuznXRlgVBwuKKGxJTsl ajhcw7EvJGJPc9os2lBg29k/0qx9+r63y2ez5x/uHq16JWetxJQezYQhSgeJCZ41o7h1 jW7M9J9uZ3TfI1NnEr2TNDTtT4RiTBoDknYZgCSUPNQxcgJvyfxw+L+6GhOH+upfcHPB Uojg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=p9X9UxNP; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hk2-20020a17090b224200b001ecd1073f0dsi2306043pjb.140.2022.06.21.11.53.44; Tue, 21 Jun 2022 11:54:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=p9X9UxNP; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345270AbiFUSwZ (ORCPT + 99 others); Tue, 21 Jun 2022 14:52:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229743AbiFUSwX (ORCPT ); Tue, 21 Jun 2022 14:52:23 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D2F218E39 for ; Tue, 21 Jun 2022 11:52:22 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id g4so11521690lfv.9 for ; Tue, 21 Jun 2022 11:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LyC2xQZ/J7P7EEp9bZtR/lqMCT8LU/RUU5bcVNVOJp8=; b=p9X9UxNP81FAxeV9hvfPvi0M1iZP1ZeRtYmFuwVS+IkfswgT2N6ure1O+4nZotEKvi GodnVRPsPpulB/oqanX1HtbY3ONqc6zD1WY2WcJfuSGlCdeyH2qjJ2KlMMe4deX4ovrf QaJJJrw+8ATGO11sXcMaXgPb6tEP/XJ4+vRCWcJ91f8NvXxpmXpT3RMOkQScZ4LlWzVG P8TSSHhFY1FcVrInXyd79UctirOH7+JnnM4RfDeEsXzaW4qGxw7OYe57lv5BvbjVgZbC Bo+pWU0Vww/QfSsArHVnSaA6o67fqVw85FJVhHpcEpmaL91y0ElPuBH13bvvvbikeOCV acLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LyC2xQZ/J7P7EEp9bZtR/lqMCT8LU/RUU5bcVNVOJp8=; b=hLGdOXfwk/K3j3goxI9KpnVvKte8hJkWRnCP0uUnTlphfb0RtvLYZz3qCjXrf3Xqpz lmyQGAhJ9P5GgfaUW5WFDv1VnpiTrL/FuOaW0AuYgk4NlJcZ6+VZQxU0lNY3FWiq4rUs 4HByNAAZ4pY08CHXEz8rcgp+6aqNUC720BEGgIq7DAcOTGig8P4lY5kgnwz/xEG6MRRV yNH8tF3ejz7G/9UTQXQNqDRbT/rFNu+sGPi8kbqnWkfGyZ3D0iXLwBypCEScYS8wAFuA VcXHV6FwFymXh1WgaHf9SyNgdAKWtxqP+t89LZPkzV8mATeS5NSd01r0ytoscjRvJUTn ePHQ== X-Gm-Message-State: AJIora9jvqLzrYmDSBjw0eg1vFRLicKA2nqf/140WMS4yxF8NRK3XkVb jeQC/N+wH3skhi2Rgz2TF1+CD03G5hpu992/yMKT1NQqnIs= X-Received: by 2002:a05:6512:1307:b0:47f:67ab:4064 with SMTP id x7-20020a056512130700b0047f67ab4064mr8780904lfu.106.1655837540974; Tue, 21 Jun 2022 11:52:20 -0700 (PDT) MIME-Version: 1.0 References: <8d5c4724-d511-39b1-21d7-116c91cada45@pengutronix.de> <1d1b76cf-df6f-3935-5cd2-c45ea78f2c33@pengutronix.de> In-Reply-To: <1d1b76cf-df6f-3935-5cd2-c45ea78f2c33@pengutronix.de> From: Luiz Augusto von Dentz Date: Tue, 21 Jun 2022 11:52:09 -0700 Message-ID: Subject: Re: [BUG] BLE device unpairing triggers kernel panic To: Ahmad Fatoum Cc: "linux-bluetooth@vger.kernel.org" , Marcel Holtmann , "regressions@lists.linux.dev" , Pengutronix Kernel Team , Tedd Ho-Jeong An Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Ahmad, Tedd, On Tue, Jun 21, 2022 at 1:32 AM Ahmad Fatoum wrote: > > Hello Luiz, > > On 20.06.22 22:18, Luiz Augusto von Dentz wrote: > > On Mon, Jun 20, 2022 at 3:06 AM Ahmad Fatoum wrote: > >> Disconnect of connection #1 being processed after new connection #2 > >> concluded sounds wrong. Would I be able to reconnect > >> afterwards or would all connections, but the first, be directly > >> disconnected...? > > > > That depends on the order you have queued the commands, it will be > > processed in the exact order it is received, that why I said it is > > single queue design, and it is done like that to prevent messing up > > with states since we know the exact order the commands will be sent. > > > >>> otherwise we need a > >>> different queue to handle command that abort/cancel other already in > >>> the queue. > >> > >> Is the revert an acceptable interim solution or are there issues > >> I am missing? > > > > Afaik there were problem with concurrent connections request, so what > > would really help us here is to have some tests to emulate this > > scenario with our CI, in the meantime please check if the following > > fixes your problem: > > > > https://gist.github.com/Vudentz/b4fff292c7f4ad55ca3299fd5ab797ae > > Doesn't help unfortunately. First pairing works as before. > Second still fails: > > Bluetooth: hci0: Opcode 0x200d failed: -110 > Bluetooth: hci0: request failed to create LE connection: err -110 Can we try to add a test in mgmt-tester to reproduce the error above? > Cheers, > Ahmad > > > > >> Cheers, > >> Ahmad > >> > >>> > >>>> We've been deploying the revert for a while now and I just posted > >>>> it to the mailing list[1]. There have been other reports > >>>> of this issue with different hardware too and fixing sent_cmd > >>>> would likely be too complicated/time intensive for me. > >>>> > >>>> I am happy to test future patches that fix this properly though. > >>>> > >>>> [1]: https://lore.kernel.org/linux-bluetooth/20220616092418.738877-1-a.fatoum@pengutronix.de/T/#t > >>>> > >>>> Cheers, > >>>> Ahmad > >>>> > >>>> > >>>> > >>>>> > >>>>> Cheers, > >>>>> Ahmad > >>>>> > >>>> > >>>> > >>>> -- > >>>> Pengutronix e.K. | | > >>>> Steuerwalder Str. 21 | http://www.pengutronix.de/ | > >>>> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > >>>> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > >>> > >>> > >>> > >> > >> > >> -- > >> Pengutronix e.K. | | > >> Steuerwalder Str. 21 | http://www.pengutronix.de/ | > >> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > >> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > > > > > > > > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- Luiz Augusto von Dentz