Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3767696ioo; Wed, 25 May 2022 07:46:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEOjeNARtc0JmqKYlugFeSUVE5DyKpU3Zy1iZ8uJWXwuOKqdDmk+jEJH19V10NCy+rOyz8 X-Received: by 2002:a17:906:2cc8:b0:6fd:d8d8:b8f3 with SMTP id r8-20020a1709062cc800b006fdd8d8b8f3mr29595057ejr.384.1653489962489; Wed, 25 May 2022 07:46:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653489962; cv=none; d=google.com; s=arc-20160816; b=vgFZHYibKob9FSkfFpUNs4Wz1syzDESkk0IU/a8bqx8mhxaLwSoLH7OW/QtnK8itQE BcqMMFkoegdMiWyEjSoru4ZgNKMZKvR+jXj3zeowcJQZG3pkyLsBNupeac+gvqoiURwq LBpKNEBmy4mIF2TsVxOQW6k4ulXjvhUID8Xl7UYh8z8QA1eq7H3b8SNKjnRyfLEKHiw0 cusci2eFCe8XPN7N2+1Cr5Kc7VxutVHDfXgIQlRd3ElEUkInos5tkEujv8CavvaoW4pN X7VbT/YUMaOj7o+QcZKEiwDxsHeCxQ7nltJj3Y1kMUsHJmP1KIpOHrTKg06xjKMQntgb aWTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id; bh=P4/9nmejktdBHGWFGXeM2aYCrJUEuQkgoX3CCk5u3qk=; b=G8oS580usK2ecP3XyExvhpcHh3HzHqQ44dTj77x34/dEp31i7z+fsYxly4DTlDf+Sl cac5MIQmsycYkpcTWm+CS5bxyvtUkTQ8lcVtH5LO+FLLDOdRhs4hUXDsVZIv1JAlISTX T8h7tM8CkiierFwaFGQKBYErwH6VmG2EELOhzIausOdZnPa4NmpoqvrVM19Na6Ko/55f ENldN+JC2W+Q8rYVHofugecHKLu60I1tjH2PoJCtLb3cmagcdnzFW9mc9ZszzjUZZOpg XhuUNMplZba0VHu9Yq/TjxWDEDn6GH8PjnOxpXuvNwWIKx3A6e4WhDvI7pZ3ykx98qyX BW+g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o7-20020a056402038700b0042bb1e8cf6dsi3160613edv.625.2022.05.25.07.45.19; Wed, 25 May 2022 07:46:02 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241914AbiEXWB5 (ORCPT + 99 others); Tue, 24 May 2022 18:01:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240042AbiEXWB4 (ORCPT ); Tue, 24 May 2022 18:01:56 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA678506FC for ; Tue, 24 May 2022 15:01:54 -0700 (PDT) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1ntcbA-0005jx-Az; Wed, 25 May 2022 00:01:52 +0200 Message-ID: Date: Wed, 25 May 2022 00:01:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 From: Ahmad Fatoum Subject: Re: [PATCH-stable] Bluetooth: hci_conn: Fix hci_connect_le_sync To: Luiz Augusto von Dentz Cc: "linux-bluetooth@vger.kernel.org" , Pengutronix Kernel Team References: <20220520183713.2641513-1-luiz.dentz@gmail.com> <148a9f76-0784-1d17-22cd-80343895aa37@pengutronix.de> <9e5b51ae-5089-dc91-57cb-52b0d76249d8@pengutronix.de> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-bluetooth@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 Hello Luiz, On 24.05.22 20:08, Luiz Augusto von Dentz wrote: > On Tue, May 24, 2022 at 8:55 AM Ahmad Fatoum wrote: >> On 24.05.22 16:48, Ahmad Fatoum wrote: >> I see now that this fix doesn't build for v5.17 because hci_conn_failed >> was only introduced in v5.18. Can the hci_conn.c hunk be safely dropped? > > Are you talking about: > > if (status) { > - hci_le_conn_failed(conn, status); > + hci_conn_failed(conn, status); > goto unlock; > } > > You just need to replace hci_conn_failed with hci_le_conn_failed or > well in the code above the end result is the same since it is not > supposed to cleanup in the event handler. Yes, that cleanup in le_conn_complete_evt() needs to be removed. I am talking about the other hunk in hci_conn.c: - if (!conn) + /* Check if connection is still pending */ + if (conn != hci_lookup_le_connect(hdev)) goto done; - hci_le_conn_failed(conn, err); + hci_conn_failed(conn, err); done: hci_dev_unlock(hdev); Can this be dropped for v5.17? 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 |