Article View: linux.kernel.netdev
Article #5727Re: [PATCH net v2] net: usb: lan78xx: fix error handling in lan78xx_open()
From: Andrew Lunn
Date: Tue, 20 Oct 2026 21:05
Date: Tue, 20 Oct 2026 21:05
20 lines
9132 bytes
9132 bytes
On Tue, Oct 20, 2026 at 10:26:14PM +0200, Stefano Munari wrote:
> A failed interrupt URB submission leaves NAPI enabled and EVENT_DEV_OPEN
> set. A subsequent open enables NAPI again, triggering BUG_ON() in
> napi_enable().
>
> Clear EVENT_DEV_OPEN and disable NAPI on the submission error path.
>
> Reproduced using failslab on a Raspberry Pi 3 Model B+ (LAN7515).
> With the fix, the injected allocation failure returns -ENOMEM and a
> subsequent open succeeds. Verified connectivity with ping and SSH.
Memory allocations for small blocks generally don't fail, so this is
theoretical, and very unlikely to happen. Please target net-next, and
drop the Fixes tag.
Andrew
---
pw-bot: cr
Technical Details
Message-ID:
<1449a6a1-670c-4d1d-bb98-51f92e32d848@lunn.ch>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349584-linux-kernel-netdev=dewy.ruReferences:
<20261020202614.30277-1-stefanomunari.sm@gmail.com>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-349584-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2] net: usb: lan78xx: fix error handling in lan78xx_open() Date: Tue, 20 Oct 2026 23:05:15 +0200 Organization: Usenet Network Message-ID: <1449a6a1-670c-4d1d-bb98-51f92e32d848@lunn.ch> References: <20261020202614.30277-1-stefanomunari.sm@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="3963878"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Qy26aMnjqvje2f9gVBvTzAKcX3c= sha256:s/LVUWHN/6jaTo5HyUPHI5y6y2ZEkiL0KtrxoxAFJYU= sha1:j4yxNO2SZb/z4c4or/SxWQIH36s= sha256:55jy7Tv5lN6AHTyXfl2rnBEshltv7FKGhZSIFXktEBY= 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 F2EEE110E56; Wed, 21 Oct 2026 00:10:42 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.95 X-Spam-Status: No, score=-1.95 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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 (1024-bit key) header.d=lunn.ch 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 sj15kx3B6ecq; Wed, 21 Oct 2026 00:10:39 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-349584-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 20D29110E42; Wed, 21 Oct 2026 00:10:31 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 64E82309C7; Tue, 20 Oct 2026 21:05:53 +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=1792530353; b=mPOk8VYFcuzi7jOcWLXtqrzS71SQMbQx1GyFM3Yzxlii5LCf8uLSttyniISenRRAaUy/ QUGZsYWoz5UffuTDH8kyL3fi+ut9nB9wZv7/xb3PNUjjV+OSFxqyuMaizzw6dMDick0gU uU7oIvnUagXzQV0NZA0qysGjWyfpGh1wkmklpyUOeAd7warkysfDBEpYAJIACLsVDMoui wuy8ScwIXJULP+bGunLSDesw5+VmGQm/BByFEIcIMT8Z9U/upEnsBTWlOFWGofOLUPct0 mftItZod4XB6rYWg4qW9HTy3Oil2awSFU7UnuhKDRZfoWD4oeWBDI7j+Hy8Eqifghtg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792530353; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received: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=eMqMFwpTpqN2HVxCs4u1Rwn8A+RwwZ+HmzQanCZlbz8=; b=0Du8wFAyGjOdQBtSlUCfuk6S7V97PjuS0i7q6uMAfhn3f4F2ZPVUfhVmZ+gCN4In59bs Y/JQ6Gdtjgxfd3AJuE3y5yloPdBok64g2epYVMo/fHAKyLXBDEN8wNBOUZ2Hvnreu3Oxe 2Fm6KedTLo3VionI/SqKZAgyDkzN71MIIM/j1+tIQY7t6OsKjenTKVqnVap3dcAuyZjZV oGSxUkmVkAJpRlDm697iSaROZhaoi0HgJpvM4LCpm9DKb3+zgBeqnMRM5dl2ERECcX3G7 vMv6nR6b/oIu7Of+k9S13qZq6mqp5+58PQnbdJlUN7PhFSYnw4e1KDSAThhAx2dwk4Q== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=JDkvzPaB; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; 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 3C3F5606A326; Tue, 20 Oct 2026 21:05:53 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=JDkvzPaB X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792530337; b=jET0dlUz2aYMAG+bV01olQrnAeZD1H9xD77ummY5H02jPfo1ytYaTznHaAIbWL2JRUYS wmZmNq4xOEGNdmla6Yxa3WrsOV2fWpcb+ndxePRLNd9dzan1yokHpEFlwDj8zy1pzLWtk 6J5t9te5qN6+B/NWKRydOyihEbwd3UPEgPQI9Vn/g2H7ZWfyRYoQP8NO5Msxx94537uS7 e/Gbo0Qfyme222SPOSgHJG3odpHYR3FV4ISyT4xHzUO4VSepHpXoCq5teeFHes2DpJnVd 8ffOjsp9+jsHXuCVi0ye/cQBiql6rHMYG4VuWCFyUz1uQKDGYSelt2aN0a9boEHeE2w== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792530337; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=eMqMFwpTpqN2HVxCs4u1Rwn8A+RwwZ+HmzQanCZlbz8=; b=vRnrnEIDTG94hpoLHYNBR5eSIxKXYkfxIkvEihl4mNsxGblIX66lumzzs9665r5KkxGi 01wdXxyKGBUqtqLstnDkQ/+rLiUG3pKe6bYETukXLGKIvSVbaFw89xT8TWe3b/Pi3AnvS 30p9S+FjIC2f+fZ6WF1qsZdja8EYNF9ZtdSj8rrtZrsh5OrYnuV60JjVkB9zIGnj5PMPR NASu6yFuLcGcdcdY4LNTVrr0rK2euiZ4TXgU1LCHlU6MmMXwqw+s4ybVEUhBLZ3so9Prw x4oKouvd1vckDvvbsePZbHtXT/6Zf/DLyPfF+TxDH0z7OnTivf2ya6QOi0pK3osPw6g== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=JDkvzPaB; arc=none smtp.remote-ip=156.67.10.101 X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF4CD606A31A; Tue, 20 Oct 2026 21:05:36 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BF4CD606A31A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=eMqMFwpTpqN2HVxCs4u1Rwn8A+RwwZ+HmzQanCZlbz8=; b=JDkvzPaBGFYP/YGilqnwS/4V7d cQEL59YkU01AvJpJspB2yA2HPmO+upPkeQOxWljn4yzebKeoo5pwhFvlR9KAkAHk7JlsLeo55Jfo2 bJTyVQ0WMl9kwqb5sS0y0tPbL2nEdteYIgHBInrDPBh2sw+rhXkbbuIKZi/7m0/evMGU=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xJH1H-00BvdT-Be; Tue, 20 Oct 2026 23:05:15 +0200 X-Cc: Thangaraj Samynathan <Thangaraj.S@microchip.com>, UNGLinuxDriver@microchip.com, Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>, Oleksij Rempel <o.rempel@pengutronix.de>, Nicolai Buchwitz <nb@tipi-net.de>, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org 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: <20261020202614.30277-1-stefanomunari.sm@gmail.com>