Message ID | 20221109093726.3132203-1-bobo.shaobowang@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp241988wru; Wed, 9 Nov 2022 01:46:49 -0800 (PST) X-Google-Smtp-Source: AMsMyM70x7GLa+t5ND9EzpL+AK3XywkRCiNwBIzWRIqGiRXUU0f4F1fHjDXfU4lu4nKvvgHPWrHf X-Received: by 2002:a17:907:75d3:b0:7ae:2278:ba07 with SMTP id jl19-20020a17090775d300b007ae2278ba07mr27908934ejc.354.1667987209302; Wed, 09 Nov 2022 01:46:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667987209; cv=none; d=google.com; s=arc-20160816; b=BoIkip1MgvQxJjfyZNZbj0y7Gd9qDOlVgxMv1tljGG/FHX1HzurguEjVucpIARJbEP k3Ij+kDVH8hJeXgtHG5GuuH8EdSXiW8RnIw/NONqF3owwCQVWdtmtX1jwH/SoNG/30py gN8isjpbnI7Z0mBc7GFOHOzFHZXa/K/i1101RAZEAvxYPsSxe5O5ZC78Rjx+T4J2fgzv I5chM5NHQlVYDw62xCbZNfN2XkPxypHqSCgnCYGlJw9DcOPg9R5+3McnceGc5LpnfdYl kY2mCy811Wtot4t7BJ2V3k4ViFBSMei0HmpZn0+3piYaOmqhCbAxlz1FI+wtv0rnqWG+ a6Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from; bh=YNj25b+vxt2+Xta81z4o/RMlp8hiA9LU+Th/5lQbZP4=; b=MZ8XCp23Eir/8/gA8GTuQ2O2TsblLCvqLLGr2fuI6F+r98xSH4uEQpBHUM+B2PVLbm YlXwHPQw00HYnMskZixg8BJiF1WOQG6WSxcDL6WzEwFCI5oDyBxQ+181qG1jEh7BZR1/ 7US+dz0I7wLTuhboPw/X3l4EcTD9kASspmywOrMttXkgmaOuQcJa1j1J6UMVrF3UrDqN iXbpcwshIpg0F+KMuEFFEYe4B0A/LVRcXs5USkBXjRSFKwKZJ+AQKsL8WK6ZoNfb/PBW fQJ595PBbLGIceq+o5GzD6egf09SnsdcsfHT8Xp2JumneOsB01uSygQEqn7HuswOXVcY dayg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb1-20020a1709071c8100b007ade82b9e73si16169140ejc.757.2022.11.09.01.46.22; Wed, 09 Nov 2022 01:46:49 -0800 (PST) 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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230371AbiKIJjB (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Wed, 9 Nov 2022 04:39:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230407AbiKIJiw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 9 Nov 2022 04:38:52 -0500 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BF01F5B7; Wed, 9 Nov 2022 01:38:44 -0800 (PST) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4N6fwD709dzJnQM; Wed, 9 Nov 2022 17:35:40 +0800 (CST) Received: from dggpemm500015.china.huawei.com (7.185.36.181) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 9 Nov 2022 17:38:42 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500015.china.huawei.com (7.185.36.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 9 Nov 2022 17:38:41 +0800 From: Wang ShaoBo <bobo.shaobowang@huawei.com> CC: <marcel@holtmann.org>, <kuba@kernel.org>, <liwei391@huawei.com>, <linux-bluetooth@vger.kernel.org>, <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH] Bluetooth: 6LoWPAN: add missing hci_dev_put() in get_l2cap_conn() Date: Wed, 9 Nov 2022 17:37:26 +0800 Message-ID: <20221109093726.3132203-1-bobo.shaobowang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500015.china.huawei.com (7.185.36.181) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749011355919745020?= X-GMAIL-MSGID: =?utf-8?q?1749011355919745020?= |
Series |
Bluetooth: 6LoWPAN: add missing hci_dev_put() in get_l2cap_conn()
|
|
Commit Message
Wangshaobo (bobo)
Nov. 9, 2022, 9:37 a.m. UTC
hci_get_route() takes reference, we should use hci_dev_put() to release
it when not need anymore.
Fixes: 6b8d4a6a0314 ("Bluetooth: 6LoWPAN: Use connected oriented channel instead of fixed one")
Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
---
net/bluetooth/6lowpan.c | 1 +
1 file changed, 1 insertion(+)
Comments
Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Wed, 9 Nov 2022 17:37:26 +0800 you wrote: > hci_get_route() takes reference, we should use hci_dev_put() to release > it when not need anymore. > > Fixes: 6b8d4a6a0314 ("Bluetooth: 6LoWPAN: Use connected oriented channel instead of fixed one") > Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com> > --- > net/bluetooth/6lowpan.c | 1 + > 1 file changed, 1 insertion(+) Here is the summary with links: - Bluetooth: 6LoWPAN: add missing hci_dev_put() in get_l2cap_conn() https://git.kernel.org/bluetooth/bluetooth-next/c/190ea3c3a8d5 You are awesome, thank you!
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index 215af9b3b589..c57d643afb10 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c @@ -972,6 +972,7 @@ static int get_l2cap_conn(char *buf, bdaddr_t *addr, u8 *addr_type, hci_dev_lock(hdev); hcon = hci_conn_hash_lookup_le(hdev, addr, *addr_type); hci_dev_unlock(hdev); + hci_dev_put(hdev); if (!hcon) return -ENOENT;