linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Cc: Oliver Neukum <oneukum@suse.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Paolo Abeni <pabeni@redhat.com>,
	John Ernberg <john.ernberg@actia.se>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux Netdev Mailing List <netdev@vger.kernel.org>,
	Linux USB Mailing List <linux-usb@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Armando Budianto <sprite@gnuweeb.org>,
	gwml@vger.gnuweeb.org, stable@vger.kernel.org
Subject: Re: [PATCH net v3] net: usbnet: Fix the wrong netif_carrier_on() call
Date: Wed, 6 Aug 2025 20:54:27 +0100	[thread overview]
Message-ID: <20250806195427.GH61519@horms.kernel.org> (raw)
In-Reply-To: <20250806003105.15172-1-ammarfaizi2@gnuweeb.org>

On Wed, Aug 06, 2025 at 07:31:05AM +0700, Ammar Faizi wrote:
> The commit referenced in the Fixes tag causes usbnet to malfunction
> (identified via git bisect). Post-commit, my external RJ45 LAN cable
> fails to connect. Linus also reported the same issue after pulling that
> commit.
> 
> The code has a logic error: netif_carrier_on() is only called when the
> link is already on. Fix this by moving the netif_carrier_on() call
> outside the if-statement entirely. This ensures it is always called
> when EVENT_LINK_CARRIER_ON is set and properly clears it regardless
> of the link state.
> 
> Cc: stable@vger.kernel.org
> Cc: Armando Budianto <sprite@gnuweeb.org>
> Reviewed-by: Simon Horman <horms@kernel.org>
> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> Link: https://lore.kernel.org/all/CAHk-=wjqL4uF0MG_c8+xHX1Vv8==sPYQrtzbdA3kzi96284nuQ@mail.gmail.com
> Closes: https://lore.kernel.org/netdev/CAHk-=wjKh8X4PT_mU1kD4GQrbjivMfPn-_hXa6han_BTDcXddw@mail.gmail.com
> Closes: https://lore.kernel.org/netdev/0752dee6-43d6-4e1f-81d2-4248142cccd2@gnuweeb.org
> Fixes: 0d9cfc9b8cb1 ("net: usbnet: Avoid potential RCU stall on LINK_CHANGE event")
> Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>

FTR, this patch was applied directly by Linus:

- net: usbnet: Fix the wrong netif_carrier_on() call
  https://git.kernel.org/torvalds/c/8466d393700f


      reply	other threads:[~2025-08-06 19:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06  0:31 [PATCH net v3] net: usbnet: Fix the wrong netif_carrier_on() call Ammar Faizi
2025-08-06 19:54 ` Simon Horman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250806195427.GH61519@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=ammarfaizi2@gnuweeb.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gwml@vger.gnuweeb.org \
    --cc=john.ernberg@actia.se \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=pabeni@redhat.com \
    --cc=sprite@gnuweeb.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).