Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3087734rwb; Mon, 15 Aug 2022 17:49:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR57LRsf4UOELc9OiPJY7CGPWhhAzfMPGbM19nwvr4I+xAPXEm7KM4aAVNIx1Wmz+q47RTNL X-Received: by 2002:a17:907:1361:b0:732:fefd:a25c with SMTP id yo1-20020a170907136100b00732fefda25cmr12050111ejb.669.1660610988504; Mon, 15 Aug 2022 17:49:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610988; cv=none; d=google.com; s=arc-20160816; b=nJOQO9Jt4nfnegbzGqPKvgIq7jxmrPqjEbbhlWtkynanbb3nwa1OQGg8sxIWHC6qw4 xHOP8oXqVFlLw6afxBCSLEzkk2gdIuMjEdoYgjyKZxAe2UZpO5X22C4b4fNauZ0rjTvW X1CUv2XRK/pdJwH3YWF4olnZ4AclqmI4Rr/sPxgNCjfTy6njCH1V4wBRYGfSMEJqwgky v6hXIPPvGBul6mcODqD2/5CpWbJtCXWfVIIhYosUUXgKXL0SOZ9vRYRkXe7sONnAUeUb 5ioTgJGLdmPtO/0X2vWYMaKuSk2G27I+JhaMntSs+ZEwK1mgrFZc30LGHGRtSk1FM+Kc uo9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zj1rEmeochWEGKYf8OgsG3iPVuF7QWtrd1Hkm9XnxxQ=; b=WDVSfJ67lfnhUxLB5VLKJ1q8aBfm+mzwQCVSI0CpXxDIUtS2xbBToyW/AnoAYSdlyR L0e+jntgKMZA9B8DJMSOqdBQvLV0pC3H7sz55bAQXDcyEgVtM+JJm3OQCjhYLg9x6cdX eRC71mBS7FrPbrh2xMaoMl/rFy9qg+Yvm1quqq3/FxoysrAwqEiI9SdHmKtvxapicnVx UlQi+6sDVS+W5bPR4JGgrdJ/kfbMRATqL4t6qiYV6CKXJDVsRA0Y9v8gDdw518yoTUpl t7Z/tyqT8atoSoaBTaqRoqrNBqNDp7ykdRm3TCnr3tkiTs+W6HMG66a+yuWAC0iRZMDB QTNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zELVUNh5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf8-20020a1709077f0800b00730412fe4d5si10935615ejc.740.2022.08.15.17.49.22; Mon, 15 Aug 2022 17:49:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=zELVUNh5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355742AbiHPABX (ORCPT + 99 others); Mon, 15 Aug 2022 20:01:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356137AbiHOXxt (ORCPT ); Mon, 15 Aug 2022 19:53:49 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F287C15D8B4; Mon, 15 Aug 2022 13:18:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A8709B81180; Mon, 15 Aug 2022 20:18:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2205C433D6; Mon, 15 Aug 2022 20:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594699; bh=gf2Bk2iD4BPXWUsUwXH2JRtnr/UQ0t8TXQ7XkoxKOZ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zELVUNh5wKQeHnAM70+JF7J7kdvhNHlOgwb/Q3XvQSBOUZIx42prms9ZnvMro8Fu9 MFph+SmkQivEbEPT7yEHGZHx1xPV5rgF4dYdICeCQKAwKUf1i0aBSQmGtK8bcsH1zF lakuLPe87ANv05+iJgtWgBTEPgcale9HPOdJ84PM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luiz Augusto von Dentz , Zhengping Jiang , Sasha Levin Subject: [PATCH 5.19 0531/1157] Bluetooth: hci_sync: Fix not updating privacy_mode Date: Mon, 15 Aug 2022 19:58:07 +0200 Message-Id: <20220815180500.889796697@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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-kernel@vger.kernel.org From: Luiz Augusto von Dentz [ Upstream commit 0900b1c62f43e495d04ca4bebdf80b34f3c12432 ] When programming a new entry into the resolving list it shall default to network mode since the params may contain the mode programmed when the device was last added to the resolving list. Link: https://bugzilla.kernel.org/show_bug.cgi?id=209745 Fixes: 853b70b506a20 ("Bluetooth: hci_sync: Set Privacy Mode when updating the resolving list") Signed-off-by: Luiz Augusto von Dentz Tested-by: Zhengping Jiang Signed-off-by: Sasha Levin --- net/bluetooth/hci_sync.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index 1641db8722e0..b5e7d4b8ab24 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -1612,6 +1612,9 @@ static int hci_le_add_resolve_list_sync(struct hci_dev *hdev, bacpy(&cp.bdaddr, ¶ms->addr); memcpy(cp.peer_irk, irk->val, 16); + /* Default privacy mode is always Network */ + params->privacy_mode = HCI_NETWORK_PRIVACY; + done: if (hci_dev_test_flag(hdev, HCI_PRIVACY)) memcpy(cp.local_irk, hdev->irk, 16); -- 2.35.1