Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3572995ioo; Wed, 25 May 2022 03:47:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ0xjIHmBfMx5WO+Fje1892tRKh2WKHUPe/RC7VlWl5ytJxFiKwc4ConW8nYdDocDb3QE0 X-Received: by 2002:a63:7c4e:0:b0:380:8ae9:c975 with SMTP id l14-20020a637c4e000000b003808ae9c975mr28886614pgn.25.1653475653585; Wed, 25 May 2022 03:47:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653475653; cv=none; d=google.com; s=arc-20160816; b=f1maJpchZVClM+wgkrfrtN95Qoim2tJek5xliNAHnWFyJ5qeWHkdvFtnvtwQMFThik BlwkUY4/sHFN5eyn0VEjvc0704fW+l60nYL2s4ootpcu02xukFW8wh7N1r0dZ0HlJMOh T+P8Hf83zvRk/OX4VVzJYIrS98hPoc0OcRjyFIhL4i4tMyPm1wpR60BYzHB/5KFpQr/q raD1k25t7tFl4vBz3D5zzej1QsW6cAcRMuIVCCg8SraGuuC+cAMcuRlvRqiITfSk1ru4 BQG1+78kp9q8V5qH5mzVtKWrjiGBpk4BUZxXnONVWEIbE3DiB7OMcO6CTNqc8pAxmfTs 6KnA== 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=FKHMTFjQws0f0fEqUojYEp1QD0ZQeUAbjgeH93iNZT4=; b=Nzp3Ew5bON8mKNBwBcvsYcCtWpby2IrWvH/AuKrGYttWMsA+gtQ6d21UF5TxvNBxgX dUxf32Pw2ORRuxKzCoB+nbNFYD+x5/1lCflQlYGaV42u7qZI3ylpw0gTi9egbbbE5aOe dn3Zs8WEavjLDrS1XJTknWA5hQWkIKSYWCaXBGEmfOZlYFIz+OxwBOCYH9JXFGUmrSpj Yrcc4WdmOQsTFmKXVRzp5oVuHZ/zsk1SrmN8EJ3kMGwJOcLnVm+xyonDvR9M5N3ZKUrD McxlZnQdlk0BVQxyRlfR+CioVLnEEXbyZhEFyTNodO3b/oRpa14ibUDtHM1mBSgd3xqJ jl3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Gq44dh8w; 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 bg3-20020a17090b0d8300b001e09092c060si2410497pjb.169.2022.05.25.03.47.04; Wed, 25 May 2022 03:47:33 -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=Gq44dh8w; 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 S241080AbiEXXog (ORCPT + 99 others); Tue, 24 May 2022 19:44:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241044AbiEXXoc (ORCPT ); Tue, 24 May 2022 19:44:32 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D02359B91 for ; Tue, 24 May 2022 16:44:31 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id d22so17134877plr.9 for ; Tue, 24 May 2022 16:44:31 -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=FKHMTFjQws0f0fEqUojYEp1QD0ZQeUAbjgeH93iNZT4=; b=Gq44dh8wvT218pHmcPKQiQ9Wy4ZuLdJCV2bBqPPmx1FsLynTk7NIg0K5KQFVLxB0Hn /eSUTqbUQ8hU3L7E/xMmZiu1yJDZxh6aFBqJOZiHD6M11ny7c0e6DurnnoXTKBf8ByFn kwhYHcdu8qDegpKMRYTXiOwHuO9UVxOxEfN0o/Lw2eBgzZi3T02+yD2S7U4x46uLwm8Q grXbDjIIzs+1oFS3UuX4Y8I7eg7bSmYp6wuFTE+SM3ljTDiYT02seHRNjHio9MdcBumR C/40vNGAYZe+1cpUhEERWweX7+xfuWAV/D+maFI7Aw+pI3GIff7e3YQG605PGvXIC1o7 LT5Q== 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=FKHMTFjQws0f0fEqUojYEp1QD0ZQeUAbjgeH93iNZT4=; b=p8UU8R9tPJavpM3HFP456rgKsz2fNARid91j/KutCnn8qaAIuPzoCheryaBrsNN6gk NU50jU6LQIMPbU6RA+Gnb/TjmEhhQbXRneRvK74DHgOI51V+IPJtldWuswCudF8oFC1R oBqRaAJWM1I6X7xUsOgsddqbrus0R2664w3ZGDP4ZBTV6TjabHNzCGPoZR6DxdwLQ9i4 /KH07hJg0OfE3Is0eLQAb4LJ5vu6pAY5nfrCCcu6LvF9eR4gDKff1VR1PvpB6h21CxU3 nCzTdzcyjxiRGH9ieIZ0T+mZfT7+pWNGhgN+QQaGUEVQBspa/0adg7msoy7yzeLWfDg3 rsPw== X-Gm-Message-State: AOAM530cbCi6XLnoaVPHo2pJnbxONKVAra/q0kgleOThZOT7aXTIh0By zMw5spIL0XrAUj+WrEHuCnqi97UZ95CT5blWwE0= X-Received: by 2002:a17:90b:3506:b0:1e0:51a1:a8ee with SMTP id ls6-20020a17090b350600b001e051a1a8eemr7087062pjb.112.1653435870981; Tue, 24 May 2022 16:44:30 -0700 (PDT) MIME-Version: 1.0 References: <20220520183713.2641513-1-luiz.dentz@gmail.com> <148a9f76-0784-1d17-22cd-80343895aa37@pengutronix.de> <9e5b51ae-5089-dc91-57cb-52b0d76249d8@pengutronix.de> In-Reply-To: From: Luiz Augusto von Dentz Date: Tue, 24 May 2022 16:44:19 -0700 Message-ID: Subject: Re: [PATCH-stable] Bluetooth: hci_conn: Fix hci_connect_le_sync To: Ahmad Fatoum Cc: "linux-bluetooth@vger.kernel.org" , Pengutronix Kernel Team 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, On Tue, May 24, 2022 at 3:01 PM Ahmad Fatoum wrote: > > 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? I guess it should be alright but perhaps keep if (conn != hci_lookup_le_connect(hdev)) just in case. > 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 | -- Luiz Augusto von Dentz