Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp614573rdb; Sat, 6 Jan 2024 01:51:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IES9rVEPIiAUWlkHKtFqiKAzzD86VpSZg040g8MJ1bBPDzISE9g5vOE9wQ2zOdTtCjqnE7E X-Received: by 2002:a50:8d1c:0:b0:557:523e:e3d8 with SMTP id s28-20020a508d1c000000b00557523ee3d8mr207161eds.71.1704534688458; Sat, 06 Jan 2024 01:51:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704534688; cv=none; d=google.com; s=arc-20160816; b=VxrLlbl9T1akCqnL3/RLPyXInBwNeIOL3FgXP3WJOofjT5UpEFO0+KqUwhKw9P7CHl N6Djrsax6kfWBmqeACVHolb9YxANDvU1j4mipa25zhwn7P039AXKas4aOIM3kQWqYNPt E+4d3Lhldwo0/wMWtgHDJ6iY9m+CpYKA5tzu7fni/k02Td+9tJGhxHw3gNwMrvmJmmVL dwAm/Wz1UJxDx5cEyXKdkRq+FY1oEndM8Encmx8QYiTVsDjYvs2LWMnN6TbIoPnDqYLe jigKnNZaaWY38bfXsQ+7MyZHQ5AR2O2JlAbcQY6ahIz1FUEF2ilh0iu7pgWPzwAfIzkp QU9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:cc:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=+RdFOaQVd+GiM83+lCGBO3DT4aTFWNW+q/fzytrUXk4=; fh=GpyDwQc9NNg4GSGUU4B6Ia68SrmGF3Zh/0RqJsK1RqE=; b=EX4ilb37JI9YINMWewn4K5l7ryT0f3n/hdZcT6zMVxLQcVUFu5hrNicaJLm7oLRbz2 J8ZRTKs2Xng8TjJ5efvqH4e3HEMkPY8+a0Grg9JfmtVbBtuT44f4J6QiWZjen99c+YFI TWA88zf5pDoEdENRbXAk1ElakEs9eiObprWn0SCiywYfQMuk0iu5UxMtrSCxZykMRhDx nwxk2zzgNsf/8bUgmX30z9tneyJVXrAHoBz03vmJvvsJvA1/j6ekOsich8lprP/0rnGu Zha4hNlNCIelepoADBlFINAS3+Lp7i8gPobC2zSkTZYwglyROxQvMbCC6yZ0YrJykpjX TACw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-930-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-930-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r26-20020a50aada000000b005547e96a176si1358299edc.94.2024.01.06.01.51.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 01:51:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-930-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-930-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-930-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 306B41F228A8 for ; Sat, 6 Jan 2024 09:51:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1991963C0; Sat, 6 Jan 2024 09:51:22 +0000 (UTC) X-Original-To: linux-bluetooth@vger.kernel.org Received: from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5656163AA for ; Sat, 6 Jan 2024 09:51:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=molgen.mpg.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=molgen.mpg.de Received: from [192.168.0.224] (ip5f5ae9df.dynamic.kabel-deutschland.de [95.90.233.223]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 3CFE461E5FE01; Sat, 6 Jan 2024 10:50:41 +0100 (CET) Message-ID: <353ffa04-f131-4215-a941-f98ae5d22d29@molgen.mpg.de> Date: Sat, 6 Jan 2024 10:50:40 +0100 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] Bluetooth: hci_sync: Fix accept_list when attempting to suspend Content-Language: en-US To: Luiz Augusto von Dentz References: <20240105161042.4179775-1-luiz.dentz@gmail.com> Cc: Clancy Shang , linux-bluetooth@vger.kernel.org From: Paul Menzel In-Reply-To: <20240105161042.4179775-1-luiz.dentz@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Dear Luiz, Thank you for your patch. Am 05.01.24 um 17:10 schrieb Luiz Augusto von Dentz: > From: Luiz Augusto von Dentz > > During suspend, only wakeable devices can be in acceptlist, so if the > device was previously added it needs to be removed otherwise the can end … the *device* can? > up waking up the system prematurely. > > Fixes: 3b42055388c3 ("Bluetooth: hci_sync: Fix attempting to suspend with unfiltered passive scan") > Signed-off-by: Clancy Shang > Signed-off-by: Luiz Augusto von Dentz > --- > net/bluetooth/hci_sync.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c > index b3141e3f9cf6..5716345a26df 100644 > --- a/net/bluetooth/hci_sync.c > +++ b/net/bluetooth/hci_sync.c > @@ -2206,8 +2206,11 @@ static int hci_le_add_accept_list_sync(struct hci_dev *hdev, > > /* During suspend, only wakeable devices can be in acceptlist */ > if (hdev->suspended && > - !(params->flags & HCI_CONN_FLAG_REMOTE_WAKEUP)) > + !(params->flags & HCI_CONN_FLAG_REMOTE_WAKEUP)) { > + hci_le_del_accept_list_sync(hdev, ¶ms->addr, > + params->addr_type); > return 0; > + } > > /* Select filter policy to accept all advertising */ > if (*num_entries >= hdev->le_accept_list_size) Reviewed-by: Paul Menzel Kind regards, Paul