Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1276398ybj; Tue, 5 May 2020 17:00:47 -0700 (PDT) X-Google-Smtp-Source: APiQypJxnzWWT1cAE7eeoVWYXzU7OHwIWKmLRQB30n6vfCqYC00DbMWOndHesKDs6Wu+30L15+DL X-Received: by 2002:aa7:d2d0:: with SMTP id k16mr4969829edr.354.1588723246935; Tue, 05 May 2020 17:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588723246; cv=none; d=google.com; s=arc-20160816; b=FOGDg06Yd6YzCUUMQ6MH5fA/3RNNiXvqozc+j6D0VCgUME2QoN8mwab+AWB3ZYak0h afHKmNnxFe5xrqynx233dT6Hsk0AuGi0fQDIc8UEWdF/kVd4R1A9esKgiEtDH5HlS7Sf FmOmZ9a0OfFsXDeCkeE/fTsLulqu9wPexEAh7uJCaFW5oUyweirr9a83qrUigMUHs3FO 1yyKlrXqgbwNuHxFDqRrUlQPXF72KRB4x0Q89ArKkeSwNFPChboNAMhdjVpTWvYQnD/o WVQEnbTs8Yzg+6wB5jnLeof1vNmZyKz8EjSlRQPOXQAhJbiDtuBdJo9fRr8UZ0wjMbkJ 1xAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=M/lOXwJ10lZREjH/g0nBHnRAQAxDlzXtqSNjgFSkMmY=; b=xmijCvrm4kWuV5gNnQwY5I4u+MzVH8UoaOCGD0zH6t8Wsedwap/7WfdIr0gM6VDMcz 6d9G8tM6M11+jB4bWfqCEDrgNyO66NRMPLdIHmD/E8MatrGroV9I4HPytZQkpDyELgbP FySelksHeswrOLb9AjaZyUr/en6GmrwTVMW0rov3AkqY9JC6n4o9OzYtgtSiyu9Bm++Q Fd3q6pmkn/ecD2Dx10D+acNG9wakXzZyRNj7JHzdVYGFKJh3/3b7SDZg8nhoqTdrKuEz XHOt16PZ+VGEIU9KWqEtb1ASaIo4v9Mcj6/cW17M4PRk0uNkI4N/4RMOdck/N7VU83Pq HlPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dR428xa5; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l16si150926ejq.268.2020.05.05.17.00.10; Tue, 05 May 2020 17:00:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dR428xa5; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 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 S1729170AbgEEX7z (ORCPT + 99 others); Tue, 5 May 2020 19:59:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728875AbgEEX7y (ORCPT ); Tue, 5 May 2020 19:59:54 -0400 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCB6FC061A0F; Tue, 5 May 2020 16:59:54 -0700 (PDT) Received: by mail-ot1-x341.google.com with SMTP id c3so3299015otp.8; Tue, 05 May 2020 16:59:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M/lOXwJ10lZREjH/g0nBHnRAQAxDlzXtqSNjgFSkMmY=; b=dR428xa5XKa4gysK0zL+lRz9rkpXqI7TLC1PUnRmhcGUU4RtTcCOdSrHvB3Ouqd1xI 9HTlwQXl8kQY9tIToyHqvb874JrRAeNX/MXafaq6hJIro/mudyF75ROZo0AQ9V4lGFT1 t+QFnAnfZx8JxmcPZMNNVJar1Navzxsca+uNgfuwbL7vMgKUt2OSFhA8kDMOXOmd/bsZ 1EBdehvkuMw2cVSVZ2fg3Ssb68lOlJyf0PJkIGQpA9WlCt3F6u4S8ziZiL+XM/t8lUoq b6gl4TuLYyFe+SAnkrj2dh6APEoqsWiejVzy0tp7SyIpf17OvZQQSLriI3WuFm1m1gbe c3mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M/lOXwJ10lZREjH/g0nBHnRAQAxDlzXtqSNjgFSkMmY=; b=a4j5RVd7+K+USkxNwKmcgLcmNTkEpCRF2yEm9nK8O3YaU/vjPHwoL2uJhAlfrDydwY AVPEFjrL4G4S1/zX8xGXHvawfDp6pdxXXBSWPXh5VF4J+cDN6WAwKU/v/pwFHaJ7qxLb j3JyCkSjTOqs9kHkucfk2JnokY4dkIlK6WtxJXiAFxBxeooBF7iiPyEixnezoLtEdfc/ N89wfYGik3873On59JrZhNhXagg3RUGoJEhi2MCgbO4diJtSODfNecHc+lvIi5PicvOx dc2HW4ER9clmFCn6TCGCBKAcCAwivA2cYP5IGxM8bEk6VichDn/TdUqcZMxowPNwQZes A4Ww== X-Gm-Message-State: AGi0PuZ8lahE3IkB9qxGnjkASXMTO1h5ZQPB0vAWrk5g35UB9F47TeKd AgrgWlS6BrqltcP1uj2+GmLAvLDDyeap6PTU+vfUFi1i X-Received: by 2002:a9d:57cb:: with SMTP id q11mr4639813oti.11.1588723194213; Tue, 05 May 2020 16:59:54 -0700 (PDT) MIME-Version: 1.0 References: <20200414115512.1.I9dd050ead919f2cc3ef83d4e866de537c7799cf3@changeid> In-Reply-To: From: Luiz Augusto von Dentz Date: Tue, 5 May 2020 16:59:43 -0700 Message-ID: Subject: Re: [PATCH] Bluetooth: Terminate the link if pairing is cancelled To: Marcel Holtmann Cc: Manish Mandlik , linux-bluetooth , ChromeOS Bluetooth Upstreaming , Alain Michaud , "David S. Miller" , Johan Hedberg , netdev , LKML , Jakub Kicinski Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Manish, Marcel, On Tue, Apr 28, 2020 at 2:38 AM Marcel Holtmann wrote: > > Hi Manish, > > > If user decides to cancel ongoing pairing process (e.g. by clicking > > the cancel button on the pairing/passkey window), abort any ongoing > > pairing and then terminate the link. > > > > Signed-off-by: Manish Mandlik > > --- > > Hello Linux-Bluetooth, > > > > This patch aborts any ongoing pairing and then terminates the link > > by calling hci_abort_conn() in cancel_pair_device() function. > > > > However, I'm not very sure if hci_abort_conn() should be called here > > in cancel_pair_device() or in smp for example to terminate the link > > after it had sent the pairing failed PDU. > > Id recommend leaving the hci_abort_conn out since that is a policy decision the userspace should be in charge to decide if the link should be disconnected or not. > > Please share your thoughts on this. > > I am look into this. Just bare with me for a bit to verify the call chain. > > Regards > > Marcel > -- Luiz Augusto von Dentz