Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp223431rdd; Tue, 9 Jan 2024 01:59:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IEu8hl5/W0L/e8Z5+uwoY4Uj64y7DGDYwWt2trYXdSbaqFJLCaf7GxP6LvGHOvnRi083Wsh X-Received: by 2002:a05:6214:1d27:b0:67f:4de5:8512 with SMTP id f7-20020a0562141d2700b0067f4de58512mr6910658qvd.116.1704794374787; Tue, 09 Jan 2024 01:59:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704794374; cv=none; d=google.com; s=arc-20160816; b=hPqqAfrieqJLpvfLfK/F8wni02UGrxmV4d/Tje7QtEx8RVjqB/mQBCQiQEPhBybjVg gCnGoeX65U16TLGLJSKekOOMeLP5jtXhLV2RdYryyEFAh5vWPrua3cBiiLhPujMJT9qe U2Z6WPXwI433yqOCSPwKssHBc1y6VJJ0/pKuX4y3+s390TC391z6wDiEHQn306nW+5HX wnBldhBppVw4TlWuJrbHVD///f/TwO8O94Fa+Rs6zt8dA8Do/GqVTNbXSR4UyF9QUx3q UeUATu3M475IAY8L49pyP3SW98uyIyynynN6VRKZJAUy9shZGoflWRrTiEreWEzkSZzN fphQ== 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:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=JI6e2vk8PGK72p6NLEj10f2EdBpD1zhTtm86rGDrRG8=; fh=DFHsWGfLJYcpPxW4wDvz7HCFuJVpGZlxe/QG3FueA98=; b=Qu2E2gtkX2Aow86RKulSMGDMa9KYuRtUdc0va44s2P29HXmPS8comBo/AwIGA7K99e x+LzWGVWlGbDiG/I/iEs1T4GCx3GQpqFQzJbbH2dH6Y1fl6WPMcN9k9kIYjThBOxUmq+ gT9gZIzmFfkSgEijSvRCqGeqbjTWz9PIoEI5mWGximMMTxTCUt+njLVWGjaGd5y+jbEg 7WuSHSAyzIhHy4iCLRO/MXGIxTcbRcgvcxcMQBBHFzxmcVJYE9smj4iODHSZMgwwBrTw jVG7TbcIl6UiGimcTDMNHLOKwhXc2deiik9gDhQtpyPrFYavONcZg8z8dWdjlQdjVUM5 ezJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-986-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-986-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b1-20020a0cb3c1000000b0067f0ab12cdasi1837691qvf.524.2024.01.09.01.59.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 01:59:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-986-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-986-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-986-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4C5561C23D96 for ; Tue, 9 Jan 2024 09:59:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65D0235F19; Tue, 9 Jan 2024 09:58:59 +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 9E97431A7E; Tue, 9 Jan 2024 09:58:53 +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 [141.14.220.34] (g34.guest.molgen.mpg.de [141.14.220.34]) (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 21BC861E5FE01; Tue, 9 Jan 2024 10:58:42 +0100 (CET) Message-ID: Date: Tue, 9 Jan 2024 10:58:41 +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 1/1] Bluetooth: hci_event: Fix wakeup BD_ADDR are wrongly recorded To: Zijun Hu Cc: luiz.dentz@gmail.com, marcel@holtmann.org, johan.hedberg@gmail.com, linux-bluetooth@vger.kernel.org, stable@vger.kernel.org References: <1704789450-17754-1-git-send-email-quic_zijuhu@quicinc.com> Content-Language: en-US From: Paul Menzel In-Reply-To: <1704789450-17754-1-git-send-email-quic_zijuhu@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Dear Zijun, Thank you very much for your patch. Should you resent, some nits for the commit message. For the summary, I suggest: Bluetooth: hci_event: Fix wrongly recorded wakeup BD_ADDR Am 09.01.24 um 09:37 schrieb Zijun Hu: > hci_store_wake_reason() wrongly parses event HCI_Connection_Request > as HCI_Connection_Complete and HCI_Connection_Complete as > HCI_Connection_Request, so causes recording wakeup BD_ADDR error and > stability issue, it is fixed by this change. Maybe: … stability issue. Fix it by using the correct field. How did you reproduce the stability issues? As you sent it to stable@vger.kernel.org, could you please add a Fixes: tag? > Signed-off-by: Zijun Hu > --- > net/bluetooth/hci_event.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c > index ef8c3bed7361..22b22c264c2a 100644 > --- a/net/bluetooth/hci_event.c > +++ b/net/bluetooth/hci_event.c > @@ -7420,10 +7420,10 @@ static void hci_store_wake_reason(struct hci_dev *hdev, u8 event, > * keep track of the bdaddr of the connection event that woke us up. > */ > if (event == HCI_EV_CONN_REQUEST) { > - bacpy(&hdev->wake_addr, &conn_complete->bdaddr); > + bacpy(&hdev->wake_addr, &conn_request->bdaddr); > hdev->wake_addr_type = BDADDR_BREDR; > } else if (event == HCI_EV_CONN_COMPLETE) { > - bacpy(&hdev->wake_addr, &conn_request->bdaddr); > + bacpy(&hdev->wake_addr, &conn_complete->bdaddr); > hdev->wake_addr_type = BDADDR_BREDR; > } else if (event == HCI_EV_LE_META) { > struct hci_ev_le_meta *le_ev = (void *)skb->data; Reviewed-by: Paul Menzel Kind regards, Paul