Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3469671pxj; Sun, 20 Jun 2021 22:20:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQWTs3aKZfIgOjdZFjXm4Ub1p3UjFsqdn8VpDEVvG+2A4ezxf6Sh94Tiqv2mwomQkfF8ee X-Received: by 2002:a02:ccab:: with SMTP id t11mr1833911jap.1.1624252857026; Sun, 20 Jun 2021 22:20:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624252857; cv=none; d=google.com; s=arc-20160816; b=sAPjDXVFfGbJLxe+cE4RO5Ymcge7UDXtby3gB3FR18EExBAVILEuv7/WwNYeJtF+Gq bjBmuY78rivMAP51K8tPmQOGn/7Cagi/2X5sYC9hW1Kulspt9ybCXmq4aI2j3kXZOjM/ IgT0TCeTwRjsKHCJbMwsJSGjiUzHiMuQxDWxTZIYM0uwy7ssl/DZ7PpDS5ODrayf26s1 yz+OXu93ky42RZaEFMdc6GBKSYgYIQ9Pfh1RMSdV6hquDMvzw0SyZ4NWVdlWk2IV+xB9 1irdz7bpzzEOeNgEcYMC93zCSV01z5y6LqWYi8MzIrD+iXecjvrW5Ff+8mtjiQpvws0H TZuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:references:in-reply-to:subject:cc:to:from :date; bh=fe/TfYRS8aScHPCMhE5pXKntUJslT3vT66TFVG3Ajh8=; b=tOgd9tp8YFg3CJJhf2T/JUtisNHKvfEhj8Cd9P4D1B/cZeA/mORWFD9nG8mFwM+cF7 bbHDoI0QrTRpMwV61Lu02KwvoXwkTLipxso5cKyZz/zRLVO7nPZLBJ0g5fU38WQZkUrJ nQuKyWHeCIrOwJXxM0gAO4qeBV7opr5gJ9Uvk75pijmQyunwGN7SLD0jSu0sTmFDn1GI Or9x5+bIMuei4UFFnH/7CkXgSK/bfcjx7qP7O0vgDn7ltMfh51aH8+GTk6JJrZT8MSyl e0qxtnepZdWULXjqYPi41wGHkXUoym0mY2AYUm9/4x2ef7xeDTeuYl7spajl85S2Yd5S kfHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si19163763jac.31.2021.06.20.22.20.45; Sun, 20 Jun 2021 22:20:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229576AbhFUFWc (ORCPT + 99 others); Mon, 21 Jun 2021 01:22:32 -0400 Received: from spam.zju.edu.cn ([61.164.42.155]:9406 "EHLO zju.edu.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229441AbhFUFWc (ORCPT ); Mon, 21 Jun 2021 01:22:32 -0400 Received: by ajax-webmail-mail-app3 (Coremail) ; Mon, 21 Jun 2021 13:20:14 +0800 (GMT+08:00) X-Originating-IP: [10.162.82.120] Date: Mon, 21 Jun 2021 13:20:14 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: LinMa To: "Anand K. Mistry" , gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: Re: Re: [PATCH 5.4 39/78] Bluetooth: use correct lock to prevent UAF of hdev object X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT5.0.13 build 20210104(ab8c30b6) Copyright (c) 2002-2021 www.mailtech.cn zju.edu.cn In-Reply-To: References: <70042d9f.111abd.17a19f94b84.Coremail.linma@zju.edu.cn> Content-Transfer-Encoding: base64 Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 Message-ID: <25433968.3904.17a2d03131c.Coremail.linma@zju.edu.cn> X-Coremail-Locale: en_US X-CM-TRANSID: cC_KCgBXV2yOIdBg+RklAA--.1345W X-CM-SenderInfo: qtrwiiyqvtljo62m3hxhgxhubq/1tbiAwIDElNG3C0fKAABsC X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PiAKPiBPbmUgbW9yZSBkYXRhIHBvaW50LiBJJ20gc2VlaW5nIHRoaXMgMTAwJSBvZiB0aGUgdGlt ZSB3aGVuIHRyeWluZyB0aGUKPiBzdXNwZW5kIG15IHN5c3RlbSAob24gNS4xMCk6Cj4gCj4gWyAg NDY2LjYwODk3MF0gQlVHOiBzbGVlcGluZyBmdW5jdGlvbiBjYWxsZWQgZnJvbSBpbnZhbGlkIGNv bnRleHQgYXQKPiBuZXQvY29yZS9zb2NrLmM6MzA3NAo+IFsgIDQ2Ni42MDg5NzVdIGluX2F0b21p YygpOiAxLCBpcnFzX2Rpc2FibGVkKCk6IDAsIG5vbl9ibG9jazogMCwgcGlkOgo+IDU2MTQsIG5h bWU6IGt3b3JrZXIvdTQ6NAo+IFsgIDQ2Ni42MDg5ODBdIENQVTogMSBQSUQ6IDU2MTQgQ29tbTog a3dvcmtlci91NDo0IFRhaW50ZWQ6IEcgICAgICAgIFcKPiAgICAgICAgIDUuMTAuNDMgIzY0Cj4g WyAgNDY2LjYwODk4M10gSGFyZHdhcmUgbmFtZTogSFAgR3J1bnQvR3J1bnQsIEJJT1MKPiBHb29n bGVfR3J1bnQuMTEwMzEuMTA0LjAgMDkvMDUvMjAxOQo+IFsgIDQ2Ni42MDg5OTFdIFdvcmtxdWV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AKWyAgICA4LjI0OTgyMV0gIGV4aXRfdG9fdXNlcl9tb2RlX3ByZXBhcmUrMHhl Yi8weDExMApbICAgIDguMjUwMjIzXSAgc3lzY2FsbF9leGl0X3RvX3VzZXJfbW9kZSsweDIwLzB4 NDAKWyAgICA4LjI1MDYxOF0gIGVudHJ5X1NZU0NBTExfNjRfYWZ0ZXJfaHdmcmFtZSsweDQ0LzB4 YTkKWyAgICA4LjI1MTA0N10gUklQOiAwMDMzOjB4N2YxNzFlNGMxYmViCgpBcyBBbmFuZCBoYXMg YWxyZWFkeSBwb2ludGVkIG91dCwgdGhlIGNvZGUgcmVhZF9sb2NrKCZoY2lfc2tfbGlzdC5sb2Nr KSBpcyBub3QgZ29pbmcgdG8gYWxsb3cgdGhlIHNsZWVwIG9mIGxvY2tfc29jayhzaykKCi0tLSBh L25ldC9ibHVldG9vdGgvaGNpX3NvY2suYworKysgYi9uZXQvYmx1ZXRvb3RoL2hjaV9zb2NrLmMK QEAgLTc1NSw3ICs3NTUsNyBAQCB2b2lkIGhjaV9zb2NrX2Rldl9ldmVudChzdHJ1Y3QgaGNpX2Rl diAqCiAgICAgICAgICAgLyogRGV0YWNoIHNvY2tldHMgZnJvbSBkZXZpY2UgKi8KICAgICAgICAg ICByZWFkX2xvY2soJmhjaV9za19saXN0LmxvY2spOwogICAgICAgICAgIHNrX2Zvcl9lYWNoKHNr LCAmaGNpX3NrX2xpc3QuaGVhZCkgewotICAgICAgICAgICAgICAgICAgYmhfbG9ja19zb2NrX25l c3RlZChzayk7CisgICAgICAgICAgICAgICAgICBsb2NrX3NvY2soc2spOwogICAgICAgICAgICAg ICAgICAgaWYgKGhjaV9waShzayktPmhkZXYgPT0gaGRldikgewogICAgICAgICAgICAgICAgICAg ICAgICAgICBoY2lfcGkoc2spLT5oZGV2ID0gTlVMTDsKICAgICAgICAgICAgICAgICAgICAgICAg ICAgc2stPnNrX2VyciA9IEVQSVBFOwpAQCAtNzY0LDcgKzc2NCw3IEBAIHZvaWQg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