Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3328698rwd; Mon, 22 May 2023 12:01:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7UZfTKPEcBGmuKuyV9PaF1t7hQ4Ykuu4fh3B6bxyPoooFsy/5pRTW09WoF+hhbA1nX68nO X-Received: by 2002:a05:6a00:2451:b0:63d:47ab:65ed with SMTP id d17-20020a056a00245100b0063d47ab65edmr18380542pfj.7.1684782108560; Mon, 22 May 2023 12:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684782108; cv=none; d=google.com; s=arc-20160816; b=qXgCY4jrKPntGcET7CxSa1fh4L8hlrIMjthkJuKxQvY2uTO6yD+WPfLrp5x23L4cB7 ObKRZLXWe5PNRYrzI1i+Zz/x3kzr0O2L2uug4MJglWvJvPjNieCdBMp1RgWhfkASSUfc toAAzhs76MuTvg82wTSaISzZeaDLnbkiXtGmxXrWr3SM++ywVXJSP6nC52bn1YetWJ7S FX/gZlg1JpxunHaG6CLDWTH/pk5mfnFCX0xakbcmhx0fSIW1DhfnIAmOfrxbm02GjS0V BLuKE3At1JZG9zwBOYMpnvzRFLioTLDT65QVCkBnv3K2bz3FJGzWMRueuFw31T0GSIe2 /GiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=D1gsl5gsQwhLK6V6M+qoxSTNog7cnLfbHC3DN7I//Uc=; b=ZqNJMZvhgBJo3ZW8EUMznN3EdNdCm8XFyRsmIWyRB9nO3qng+RlEpYm0LFY9QHgvTN vvXBSEuDF/cfI9eKRLCj4Tc1rR8+9OWN7aU1dFOayF5nBx3/qKogW2lpfwYGyM9OtQUg G6Zs6m6yjhf+ct4yRddHIhjsaoXDptI9BoAoghzeo/YZHJMiBZSvBG5CVSOxUkS5ylim VyucHxHsL+AOGNHAIdL5kkEnuoI8sm3SNOknNVuHsLy9lZrMJmQebPnqfI+w5ti0YuR9 eS8fgiKEF8MkqWnFdtr4vYX8dKQiaue9aozMjXdE6lWXHpQfL14q4WM3yvRLTiBDX/3e IVKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jV0zRuC3; 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 n22-20020a637216000000b0053094305b59si5212343pgc.875.2023.05.22.12.01.25; Mon, 22 May 2023 12:01:48 -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=20221208 header.b=jV0zRuC3; 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 S232888AbjEVS4U (ORCPT + 99 others); Mon, 22 May 2023 14:56:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231534AbjEVS4T (ORCPT ); Mon, 22 May 2023 14:56:19 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77D61CA for ; Mon, 22 May 2023 11:56:14 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2af318fa2b8so25160631fa.0 for ; Mon, 22 May 2023 11:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684781773; x=1687373773; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=D1gsl5gsQwhLK6V6M+qoxSTNog7cnLfbHC3DN7I//Uc=; b=jV0zRuC3DBAxvubJG5IgoPrNlYjT8wFziD5/4uGJyrVCqJxipv2lwfUUe8rW4W0lHW Sj3zYgVcALwgK/QAn0leEg35jqwhhmPDRSXNKWRogehB1qbRxRbN/YBTPpiCKzwXWkKo pxbJcxocVxeAG65oaDIv+QzI59ofxwGu1wiTOOToPNrra5Zztzzg/hc3w6Q9fizLyjXL OUOCW4Ane2iJweMb7i6JfpO8iQbenMCzpL5R7V6wrAbdO9+ho9vp/7GdlZUAIa/0r7vk v/pj3X/RhJIBd0F1RCqa92ZrOqL1lRBAVxK4vcrGQld/EhxSIHHL0RU9BFVf+6Uoh8Bn XTmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684781773; x=1687373773; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D1gsl5gsQwhLK6V6M+qoxSTNog7cnLfbHC3DN7I//Uc=; b=DptscoACPE47Of1Bze69+avTcSL6KaOWeUwxVSnJGx0IQ4HXnohSXEJaUkhPI46KSW 0sHu0dGN+0o4OlwCGo1QhzBsbYsP0/17VTfjzKc3yLUHAlhtobZxaoiD5WLwu/Cb9Wff yCjvmSPxQ4PG4Kms31J0uTizl3VmdBf4Jch4YeFZTDfPfBzJqqmTCneIhY9xVEi7MTjO K8jLZtNqQFWYp9n4C2i6/0mndUYO+6vSGSlDtrpuKv9AsfcjI/exr3McIWxtNuUxTzXI 4Z1cxT8jP6JO/Y6mOP5xOdq02t2qzbtA0ue79Z8gi7YuhPHswLtKyKU6PN1gLiQuRj5J bokQ== X-Gm-Message-State: AC+VfDx+pFFdBiSq5bqELHBv2fwSy4dMn2g6kyVR5+ajr9wMm9tQl4nF 43awgtc5ANtOV+iR3A3p0hFsa6EvcfkS7kUdLks= X-Received: by 2002:a2e:3a08:0:b0:2ac:8000:1ea0 with SMTP id h8-20020a2e3a08000000b002ac80001ea0mr4533229lja.26.1684781772329; Mon, 22 May 2023 11:56:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luiz Augusto von Dentz Date: Mon, 22 May 2023 11:56:00 -0700 Message-ID: Subject: Re: [PATCH 1/2] Bluetooth: ISO: consider right CIS when removing CIG at cleanup To: Pauli Virtanen Cc: linux-bluetooth@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Pauli, On Sun, May 21, 2023 at 8:52=E2=80=AFAM Pauli Virtanen wrote: > > When looking for CIS blocking CIG removal, consider only the CIS with > the right CIG ID. Don't try to remove CIG with unset CIG ID. You forgot to add Signed-off-by, also we should probably add Fixes tag as well since we might want to backport these changes. > --- > net/bluetooth/hci_conn.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c > index f75ef12f18f7..2363477af89d 100644 > --- a/net/bluetooth/hci_conn.c > +++ b/net/bluetooth/hci_conn.c > @@ -950,6 +950,8 @@ static void find_cis(struct hci_conn *conn, void *dat= a) > /* Ignore broadcast */ > if (!bacmp(&conn->dst, BDADDR_ANY)) > return; > + if (d->cig !=3D conn->iso_qos.ucast.cig) > + return; > > d->count++; > } > @@ -963,6 +965,9 @@ static void cis_cleanup(struct hci_conn *conn) > struct hci_dev *hdev =3D conn->hdev; > struct iso_list_data d; > > + if (conn->iso_qos.ucast.cig =3D=3D BT_ISO_QOS_CIG_UNSET) > + return; > + > memset(&d, 0, sizeof(d)); > d.cig =3D conn->iso_qos.ucast.cig; > > -- > 2.40.1 > --=20 Luiz Augusto von Dentz