Bug 215950 - bonding: kernel oops due to possible race with wifi adapters
Summary: bonding: kernel oops due to possible race with wifi adapters
Status: NEW
Alias: None
Product: Networking
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-07 06:24 UTC by Sebastian Bernardt
Modified: 2022-05-10 09:54 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.17.5
Subsystem:
Regression: No
Bisected commit-id:


Attachments
kernel oops syslog entry (7.27 KB, text/plain)
2022-05-07 06:24 UTC, Sebastian Bernardt
Details

Description Sebastian Bernardt 2022-05-07 06:24:29 UTC
Created attachment 300899 [details]
kernel oops syslog entry

Trying to create a resilient bond with a wired and wireless interface (https://wiki.archlinux.org/title/systemd-networkd#Bonding_a_wired_and_wireless_interface), in which the wired interface (ethernet dongle) is spent majority unplugged. systemd-networkd and iwd are used to manage the interfaces and wireless connection.

Downstream bug report: https://github.com/systemd/systemd/issues/23255

Kernel oops can be triggered reliably with the systemd-networkd configuration in the above downstream bug report. On a debug kernel, where kernel timings are a bit slower, if oops wasn't triggered during boot when systemd-network handles connections, then restarting iwd and systemd-networkd almost always triggers it.

The oops appears to be a null deference in bond_slave_state:
include/net/bonding.h:242 return slave->backup;
which suggests a race condition whereby slave interfaces are brought up or down during bond initialisation.

Note You need to log in before you can comment on or make changes to this bug.