Article View: linux.kernel.netdev
Article #1192Re: [PATCH net v6] usbnet: fix smp_processor_id() use in preemptible context
From: Greg Kroah-Hartman
Date: Fri, 09 Oct 2026 11:31
Date: Fri, 09 Oct 2026 11:31
39 lines
7306 bytes
7306 bytes
On Thu, Oct 08, 2026 at 02:03:34PM -0400, Alan Stern wrote: > On Thu, Oct 08, 2026 at 09:43:38AM -0700, Jakub Kicinski wrote: > > On Thu, 8 Oct 2026 10:16:02 -0400 Alan Stern wrote: > > > > This looks odd, how did we miss this for 8 years. > > > > > > > > Greg is probably busy, but would be good to get a confirmation > > > > from either him or some other USB expert that the callbacks > > > > can indeed be called in process context. > > > > > > They can be called in BH context with interrupts enabled. Is that close > > > enough? > > > > BH should be fine on !RT. The patch, AFAIU, is because vhci calls > > the completion callbacks in pure, unadulterated process context. > > I'm trying to figure out how urgent the fix is, basically. > > If it's a vhci bug then the usbnet fix is at most an RT problem. > > Also if vhci is doing something wrong we don't want a truckload > > of slop patches sent our way to fix 300 drivers :S > > As far as I am aware, there aren't really any guarantees on the > context of a USB URB-completion callback. The kerneldoc for struct urb > in include/linux/usb.h says "The completion callback is made > in_interrupt()", but that is most definitely out of date. I don't think so, I think some platforms still have those callbacks in irq context, unless we changed to threaded irq handlers everywhere? I could have missed that, but we should still write the callbacks to assume that and then we should be fine even if we aren't in irq context, right? > Drivers shouldn't rely on any particular context guarantees. Not even > whether local irqs are enabled/disabled. Agreed. thanks, greg k-h
Technical Details
Message-ID:
<2026100910-petition-embattled-94cb@gregkh>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343596-linux-kernel-netdev=dewy.ruReferences:
<20261004215937.302247-1-omermetekaya0@gmail.com> <20261007200049.079aeb75@kernel.org> <7c4a2f1c-f16d-479b-a11f-cef962d5e2c7@rowland.harvard.edu> <20261008094338.301a75fa@kernel.org> <06a81ea1-b17d-40bd-82d9-922de946b86f@rowland.harvard.edu>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343596-linux-kernel-netdev=dewy.ru From: gregkh@linuxfoundation.org (Greg Kroah-Hartman) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v6] usbnet: fix smp_processor_id() use in preemptible context Date: Fri, 9 Oct 2026 13:31:17 +0200 Organization: Usenet Network Message-ID: <2026100910-petition-embattled-94cb@gregkh> References: <20261004215937.302247-1-omermetekaya0@gmail.com> <20261007200049.079aeb75@kernel.org> <7c4a2f1c-f16d-479b-a11f-cef962d5e2c7@rowland.harvard.edu> <20261008094338.301a75fa@kernel.org> <06a81ea1-b17d-40bd-82d9-922de946b86f@rowland.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1092842"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:vFWI0Z9m/GzypHFuc0btxAeYcA4= sha256:EOlJupY1JOKF0VpsRsW2Q0vAqeLU9ue+J+gB6Oltliw= sha1:kMCrX8gLOeyaJzOUBZejCyOiNg4= sha256:tV0pGGa7uutsk9u0oPVq2WSQ8XmqK+UDDdiC+XSjFns= 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 5871110F665; Fri, 9 Oct 2026 14:32:53 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -0.992 X-Spam-Status: No, score=-0.992 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.241, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=linuxfoundation.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 jnLV0XDhMkdq; Fri, 9 Oct 2026 14:32:50 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-343596-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 30E0C10F5EB; Fri, 9 Oct 2026 14:32:45 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id 0104D29C81; Fri, 9 Oct 2026 11:31:29 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5461A4C4F79; Fri, 9 Oct 2026 11:31:28 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zeVbEjCH" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0ACC3CF1F2; Fri, 9 Oct 2026 11:31:20 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791545488; cv=none; b=X10X9WsF8s4qf/wKJ2WZYFevHwm6zYHfiJSbiXzyZRiOS8XnyZbu/ocP6HWdBjwqNURQoirLsovbJO/PDSJUVGlEfCY6TjfNcxrIHQ0crn2mQ/uUIByjuCyYcx1gGB2MCqt45LkXrzueqRHT3c4FJC10CY6zm3/zD9Kii3Os0cc= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791545488; c=relaxed/simple; bh=7bqAYquRcaUcKQo1uIX407Awr4Gy1tmU26ypgsoVZx8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gusCbaIQRa/wK+X4D/8At+O8vRmW6YLgNtpjTPaDIPRBjlHJvakzD/DC28ZPpRwDXUwZrKFK4KXje2/zxUSMkUQ8ZdJn3GqIEMgMXMVcDBva367crhfKgw92kxitvcnFSeCkeYPCCljY+YJg1zREtsu9BMHtVH9ewBzmRRtHWOA= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zeVbEjCH; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 990DE1F000FF; Fri, 9 Oct 2026 11:31:19 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791545480; bh=VixQS6M+aA7UakThv1UpOVO6JZbB9ttcZhFkmNbcDWI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=zeVbEjCHJi0dShia5MPNZSL/D/c1+6J8y7CeoIGQezCG8kj5Yi1WYuKho36v9sf9+ RGYkUd4MIgYIzitdjviqX3LUgfBM6tWHq/pD38q9h+wHaBg6aG7qQpbn5EaMnM9sDn CIfaprWiTgnK2nqNHxdOQ7eMNwvH6evbilne1sDQ= X-Cc: Jakub Kicinski <kuba@kernel.org>, Γmer Mete Kaya <omermetekaya0@gmail.com>, oneukum@suse.com, netdev@vger.kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, david.laight.linux@gmail.com, syzbot+04cd90bb99c6ef81a65d@syzkaller.appspotmail.com X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-In-Reply-To: <06a81ea1-b17d-40bd-82d9-922de946b86f@rowland.harvard.edu>