Article View: linux.kernel.netdev
Article #22390Re: [PATCH v4 02/33] Bluetooth: btusb: Fix MediaTek ISO claim locking
From: Leon Romanovsky
Date: Wed, 25 Nov 2026 08:49
Date: Wed, 25 Nov 2026 08:49
35 lines
10904 bytes
10904 bytes
On Tue, Nov 24, 2026 at 11:39:40AM +0100, Oliver Neukum wrote: > > > On 24.11.26 10:43, Leon Romanovsky wrote: > > From: Leon Romanovsky <leonro@nvidia.com> > > > > MediaTek ISO claims are performed from HCI setup work outside USB probe. > > Locking only the interface does not protect the claim against teardown > > of the parent device. Unconditionally waiting for the parent lock can > > deadlock with disconnect while it drains the setup work. > Hi, > > your patch raises a question. Can usb_claim_interface() ever be > used safely outside probe() without this kind of locking? No, it cannot. This is why need_parent_lock is set for every caller of usb_driver_claim_interface() running from .probe(). > If the answer to that is negative, should the locking be integrated into > usbcore? Not in the current upstream code. Currently, only two callers of usb_driver_claim_interface() do not run through .probe: MediaTek and usbfs. usbfs already holds the lock, leaving only MediaTek, which does not. Therefore, the caller should take the lock, and MediaTek is the only caller that needs to be fixed. Thanks > > Regards > Oliver >
Technical Details
Message-ID:
<20261125084905.GX14811@unreal>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371140-linux-kernel-netdev=dewy.ruReferences:
<20261124-device-trust-core-v4-0-037eb0d17b1f@nvidia.com> <20261124-device-trust-core-v4-2-037eb0d17b1f@nvidia.com> <65749362-927a-492d-8bff-573c277fe456@suse.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371140-linux-kernel-netdev=dewy.ru From: leon@kernel.org (Leon Romanovsky) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH v4 02/33] Bluetooth: btusb: Fix MediaTek ISO claim locking Date: Wed, 25 Nov 2026 10:49:05 +0200 Organization: Usenet Network Message-ID: <20261125084905.GX14811@unreal> References: <20261124-device-trust-core-v4-0-037eb0d17b1f@nvidia.com> <20261124-device-trust-core-v4-2-037eb0d17b1f@nvidia.com> <65749362-927a-492d-8bff-573c277fe456@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="158975"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ks2lf7LXSPkObyyTLAqKPzFUbK4= sha256:gmfqNXtaOgCD+9dQu3RdNgZHw8nZSKGgDpd2+CTWGtA= sha1:StBST23dIvu/IP365sFe8lZ/DY8= sha256:+AVauriWjqI77bH5moyQV/qrONN8qXtv27uLVhk05To= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 17744125E40; Wed, 25 Nov 2026 11:49:49 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r1ohaQo83zi6; Wed, 25 Nov 2026 11:49:46 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-371140-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id C37CA125E35; Wed, 25 Nov 2026 11:49:36 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 65B273B737; Wed, 25 Nov 2026 08:49:31 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795596560; b=pmobgv5406xgnYmvvPj9j+uc3LFFIIPFHOeJfZSioJouPEwFqJCS3xz4d3IpXsjm42DL NlB/qHw5AkEHgmSeRuqYJSn1R4XK8PxpxOgb2L5BeWekBZvQQrkmq8oQLfecxznAsiEkU 2xmMicH0ohlfj7+/wP7ofus1C15nSqb7XUX/F2zdKe9a1QQYseAbd3Y5ju0SvQ/90Dnno xNFzKIsVWKK5iLwzZgd02SC0fVc11jvr4ylLJmeFoSlpHxs8ZdMq667ARbgSOaAKILpo0 flwB05DrgCvQv6R+YtzRpJ2bp0hYJN15mt5FvuFPnGecLVFdeLv7uBTyEJAzWNnhXhQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795596560; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=TlND/jXIyTOutFCDB5DXoV3ddiKsYWv3HLDMVOOuvUk=; b=yt2RKhUfSYZCG4zS0sg+CerxZxPEO9vws8+wOOMmG/UbTjlR636FkRBsJiVoShrCgv5g jArzG4/xtgpdXGTNJHl5tpSkZNkVupuKDp7oTmHj95vQ3QFuklQ7mT6ULsqz6UwNVxZgc zEY7wkZF3V4H1X69SG/KIjLNX+FIPaR41LtCsmBczMABAuz3UJBBzBWNEU3f7D2ndiId1 mNAZm/dqaEQgxwM8kFzLCFfMru7V4ot6JdAbN8OvMCMVCgXfEOH8r9KSu72G64L+K1S7x ARb81f87wvsYJM56BWCpIVMfl5K+q1AO339SNzhSFvd7JzYrDUP+5vZiCOW1W9Hn85w== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CbvI696z; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A70C3606A6BE; Wed, 25 Nov 2026 08:49:20 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CbvI696z X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795596559; b=2KtqMyO4Iourzk2hYttn5GFPPoCKv6EmG04Z/i/GAKvjqgxT3goXnSgX9KnNTD5uRkFO My//Vf/oqyd4Wls/f5wpNa3BFWhlwAfhtmHwvVSn1qmiCAqLPxeXRjPxvwAgO57LTwaok N7ubEMqW+A4mpoCkGQ43IJD1U03rQ80p4MqKITTSbhb4+1/bHX7V3GZY+T09Er25zd8nL NAchWsVSp/pTkcB0G30HHqZFZTWe+i+5yd5gOvUV7WNvKsSlKllMesBUueYK1udpOYBcM 2RfOIEFgO7tAS+gljD/+l3C/paHWuCgmlWfrTuSx0EboVo4Mo9EpjCr38YycBfv3djw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795596559; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=TlND/jXIyTOutFCDB5DXoV3ddiKsYWv3HLDMVOOuvUk=; b=LQE0vBSdlPqY7FItSS5Dr/dXeU+XAOTqmx3rdyr7nSCtCBSzyk+CVGhkxIp30kXbnVin XrupdkSZSCnG5UsKMEq9dDGfzH8XfCSzJGj395bQT9RH8KAQVeB2Plennd22/fmN5wamK fgztazqQ+NMWDzbq7DqS5QDQ9kEYjq1Cjb7y1ilXLolDSENXAZqF4vHKA4JJGOpbjR/Ga C39LFiRAWs1dO7X7u/FZbRC2jQtYwlvwJ0GcKUjrPjA0MW8gN8tmdVZJukSr2ZhqY358L ydb0FZvg20BMPXJIb1mwNGictZEYP2s2E3o3yE3KOdfBvHKEYjuwDJhCqypagD1+ruQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CbvI696z; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0287606A68D; Wed, 25 Nov 2026 08:49:19 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FDEF1F00A00; Wed, 25 Nov 2026 08:49:18 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795596559; bh=TlND/jXIyTOutFCDB5DXoV3ddiKsYWv3HLDMVOOuvUk=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=CbvI696zR6OtVXAPCG7g/iPy03A2oTw21RBe6JaPhJHFPRXi+H17lOBRzJrgNARtn r+fRoufm0OiktxQGgsxLm9zCVTMRoj9kPsTPBWqqSY5vGYQEAuqD+14yaCOmlKMYgF j1qfbL6ZNKLE7MMyEMUkcV3l/4FT2ZkmMgDykuG0RcIRla9mWdpv0NQJXIM+9jb3cF VJt8oZcFXReeREr1uqelf/3atuLgWEoBVmlLglOje+t6FyydCXpPAQKHBjUs9j0ERg xnHTGpj/TffLtZ2xQ+zgZOe75RLjcDXEPhX2RuZKUdYZKO2pec6w3jDkKOOwtf+v8j Gmrfe0Cs12QCA== X-Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Danilo Krummrich <dakr@kernel.org>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Johannes Berg <johannes@sipsolutions.net>, Jonathan Corbet <corbet@lwn.net>, Shuah Khan <skhan@linuxfoundation.org>, Randy Dunlap <rdunlap@infradead.org>, Bjorn Helgaas <bhelgaas@google.com>, "Joerg Roedel (AMD)" <joro@8bytes.org>, Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>, Vasant Hegde <vasant.hegde@amd.com>, Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, David Woodhouse <dwmw2@infradead.org>, Lu Baolu <baolu.lu@linux.intel.com>, Johan Hovold <johan@kernel.org>, Eric Dumazet <edumazet@kernel.org>, Marcel Holtmann <marcel@holtmann.org>, Luiz Augusto von Dentz <luiz.dentz@gmail.com>, Nipun Gupta <nipun.gupta@amd.com>, Nikhil Agarwal <nikhil.agarwal@amd.com>, Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>, Chris Lu <chris.lu@mediatek.com>, Mans Rullgard <mans@mansr.com>, Alan Stern <stern@rowland.harvard.edu>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Andrew Morton <akpm@linux-foundation.org>, Cornelia Huck <cornelia.huck@de.ibm.com>, Andrew Morton <akpm@osdl.org>, Jeff Garzik <jeff@garzik.org>, "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>, Bart Van Assche <bvanassche@acm.org>, Alexander Duyck <alexander.h.duyck@linux.intel.com>, Dan Williams <djbw@kernel.org>, linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, linux-input@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-usb@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-acpi@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, iommu@lists.linux.dev, linux-coco@lists.linux.dev, Alexey Kardashevskiy <aik@amd.com>, Luiz Augusto von Dentz <luiz.von.dentz@intel.com>, Greg Kroah-Hartman <gregkh@suse.de>, linux-sound@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <65749362-927a-492d-8bff-573c277fe456@suse.com>