From: "Bjørn Mork" <bjorn@mork.no>
To: "Linux regression tracking (Thorsten Leemhuis)"
<regressions@leemhuis.info>
Cc: Hayes Wang <hayeswang@realtek.com>,
Linux regressions mailing list <regressions@lists.linux.dev>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [regression] Kernel OOPS on boot with Kernel 6.3(.1) and RTL8153 Gigabit Ethernet Adapter
Date: Fri, 05 May 2023 12:16:48 +0200 [thread overview]
Message-ID: <87lei36q27.fsf@miraculix.mork.no> (raw)
In-Reply-To: <ec4be122-e213-ca5b-f5d6-e8f9c3fd3bee@leemhuis.info> (Linux regression tracking's message of "Fri, 5 May 2023 11:39:33 +0200")
"Linux regression tracking (Thorsten Leemhuis)"
<regressions@leemhuis.info> writes:
>> Kernel OOPS on boot
>>
>> Hello,
>>
>> on my laptop with kernel 6.3.0 and 6.3.1 fails to correctly boot if the usb-c device "RTL8153 Gigabit Ethernet Adapter" is connected.
>>
>> If I unplug it, boot and the plug it in, everything works fine.
>>
>> This used to work fine with 6.2.10.
>>
>> HW:
>> - Dell Inc. Latitude 7410/0M5G57, BIOS 1.22.0 03/20/2023
>> - Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
>>
>>
>> Call Trace (manually typed from the image, typos maybe be included)
>> - bpf_dev_bound_netdev_unregister
>> - unregister_netdevice_many_notify
>> - unregister_netdevice_gueue
>> - unregister_netdev
>> - usbnet_disconnect
>> - usb_unbind_interface
>> - device_release_driver_internal
>> - bus_remove_device
>> - device_del
>> - ? kobject_put
>> - usb_disable_device
>> - usb_set_configuration
>> - rt18152_cfgselector_probe
>> - usb_probe_device
>> - really_probe
>> - ? driver_probe_device
>> - ...
Ouch. This is obviously related to the change I made to the RTL8153
driver, which you can see is in effect by the call to
rtl8152_cfgselector_probe above (compensating for the typo).
But to me it doesn't look like the bug is in that driver. It seems we
are triggering some latent bug in the unregister_netdev code?
The trace looks precise enogh to me. The image also shows
RIP: 0010: __rhastable_lookup.constprop.0+0x18/0x120
which I believe comes from bpf_dev_bound_netdev_unregister() calling the
bpf_offload_find_netdev(), which does:
bpf_offload_find_netdev(struct net_device *netdev)
{
lockdep_assert_held(&bpf_devs_lock);
return rhashtable_lookup_fast(&offdevs, &netdev, offdevs_params);
}
Maybe someone familiar with that code can explain why this fails if called
at boot instead of later?
AFAICS, we don't do anything out of the ordinary in that driver, with
respect to netdev registration at least. A similar device disconnet and
netdev unregister would also happen if you decided to pull the USB
device from the port during boot. In fact, most USB network devices
behave similar when disconnected and there is nothing preventing it
from happening while the system is booting..
Bjørn
next prev parent reply other threads:[~2023-05-05 10:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 9:39 [regression] Kernel OOPS on boot with Kernel 6.3(.1) and RTL8153 Gigabit Ethernet Adapter Linux regression tracking (Thorsten Leemhuis)
2023-05-05 10:16 ` Bjørn Mork [this message]
2023-05-05 19:04 ` Jakub Kicinski
2023-05-05 19:20 ` Linux regression tracking (Thorsten Leemhuis)
2023-05-05 19:37 ` Jakub Kicinski
2023-05-06 6:20 ` Linux regression tracking (Thorsten Leemhuis)
2023-05-08 20:09 ` Jakub Kicinski
2023-05-11 13:25 ` Thorsten Leemhuis
2023-05-11 16:06 ` Konstantin Ryabitsev
2023-05-07 18:32 ` Bjørn Mork
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=87lei36q27.fsf@miraculix.mork.no \
--to=bjorn@mork.no \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hayeswang@realtek.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=regressions@leemhuis.info \
--cc=regressions@lists.linux.dev \
/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).