Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3025973rwb; Mon, 15 Aug 2022 16:24:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR4SKGxnxi+49sm9VWVMYckaEXlTTZfiMyfIDHtZ0uZS7Vnu1ko9tC1s1xvUoiDKiC1T8+4s X-Received: by 2002:a05:6402:2499:b0:440:942a:40c2 with SMTP id q25-20020a056402249900b00440942a40c2mr16786367eda.37.1660605840385; Mon, 15 Aug 2022 16:24:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605840; cv=none; d=google.com; s=arc-20160816; b=wRa93XlQu10dcmUvNhfwJEkTxrUmK5A9kmn3v8AEJcsgJh3s7/pYEtN0oK1lLyAjFf jxgJHUmdOHiyKyrTIUM8t8OjZMqrYlYV6AX1a5tTXsTxSYGiwspWCHOTeG0YUgYFpC58 GJciJCoVq34gFNOx3aRJgj2Yocsspg2RsRW+lDtJCUy3OokGEpCuEBCQ11YMMFb7mYgN qivTQELvLJbzthbkVsDozmipEXROFMS8nQXGGfwsML3V3eSnLD9AQL9qBcBGhSjcqMnY hJaMXrIyRNSG+X34nzaTeUHBZH8eiAymXy9cnrWgMTZRuhJGkOhh2GooQTw1nX52jUHF xL4A== 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=dtkox5/hZayopchBXrJpKe6m0HEENwon35bAKHGwZxA=; b=nG/Ai5IzYXHbAOGh4IyHs4G2fVvpvSRaE6mH9Tf1YJRfrUo19EXMo/T2xSciIVeM2y eyKr+GosVszafUhABHMxEfGwY30txt5s5e9f6Wbiba1ZZqcNBzUKMGrWYN+Fnh7Zr8yP 5Qm3LJlRMLjmzj+PBh1losJszMIkvOvXbYGyzNuaprAyBnHxfD16mzUGYRdImdtTaQ3b bri9Qd6fwpeEEPEexMlwCeXLhqNc9pKdY33KDhTaONaqR9MMqb6uQqEqadeBX3VjFAbq bUgeNXFkFvkwqNhu2TeiOgVOVJUKIbu2QPA3cbYI3vitRdpYwkgJggBTvYk8gh2YpgF+ ytxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vfb3fZPY; 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 ga33-20020a1709070c2100b00732f83eb741si9277397ejc.985.2022.08.15.16.23.35; Mon, 15 Aug 2022 16:24:00 -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=vfb3fZPY; 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 S243926AbiHOVWv (ORCPT + 99 others); Mon, 15 Aug 2022 17:22:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344479AbiHOVRa (ORCPT ); Mon, 15 Aug 2022 17:17:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A5585725B; Mon, 15 Aug 2022 12:20:42 -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 dfw.source.kernel.org (Postfix) with ESMTPS id BC1436009B; Mon, 15 Aug 2022 19:20:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8DD6C433C1; Mon, 15 Aug 2022 19:20:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591241; bh=W8tKKp3uQ7QzLlBkW/w8MCeuiMzfHsJzpzwh8y5v5xk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vfb3fZPYhRHw0YFxIHp6gjnEjTPZabG2TcaKZqwKzt7I8NGkAEW5LaoUbQ4ii5BvO JPsGlD9r82B9HpItyvbMdNjfoQVF1JwRBXSDO+cem2/M9IlnAqtHqrw19LHw9i7bt8 xWImAGlb2Mtqpnkmv/JxJVY76zHZ+ZzIORfdJXhY= 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.18 0499/1095] Bluetooth: hci_sync: Fix not updating privacy_mode Date: Mon, 15 Aug 2022 19:58:18 +0200 Message-Id: <20220815180450.170806979@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 99ef15167a81..6f901398132e 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