)]}'
{
  "commit": "d1cf56164dc25c2c54853b23eab42369f53c8329",
  "tree": "39a1000eb85911be895459d547307bdd732e6ec2",
  "parents": [
    "f38bce9af9e2a3cced7d303a1476f21c1f42bcb7"
  ],
  "author": {
    "name": "Nguyen Ngoc Thang",
    "email": "ngocthang2710.1999@gmail.com",
    "time": "Thu Oct 29 21:24:23 2026 +0700"
  },
  "committer": {
    "name": "Paolo Abeni",
    "email": "pabeni@redhat.com",
    "time": "Mon Nov 02 16:09:39 2026 +0100"
  },
  "message": "net: phy: don\u0027t require RTNL to detach a PHY from an unregistered netdev\n\nphy_detach_internal() reads dev-\u003ehwprov with rtnl_dereference(), but\nMAC drivers commonly attach and detach PHYs while their net_device is\nnot registered, without holding RTNL. Before register_netdev(), a failed\nphylink_connect_phy() or phy_attach_direct() unwinds through\nphy_detach_internal(). After unregister_netdev(), a driver\u0027s remove path\nmay call phy_disconnect(). Both trip lockdep:\n\n  WARNING: suspicious RCU usage\n  drivers/net/phy/phy_device.c:1831 suspicious rcu_dereference_protected() usage!\n   phy_detach_internal+0x6a5/0x830 drivers/net/phy/phy_device.c:1831\n   phylink_connect_phy+0x22e/0x2b0 drivers/net/phy/phylink.c:2452\n   ax88772_bind+0xbb1/0x1520 drivers/net/usb/asix_devices.c:925\n   usbnet_probe+0xbb3/0x27e0 drivers/net/usb/usbnet.c:1812\n\nsyzbot hits this with an emulated asix device. phy_eee_rx_clock_stop()\nfails on a USB MDIO error, so phylink_bringup_phy() fails and the PHY is\ndetached from inside usbnet_probe(), before the netdev is registered.\n\nhwprov is only set through ethtool, under RTNL, on a registered device.\nreg_state also changes only under RTNL. So if the device is not\nregistered, no one else can reach hwprov, and RTNL is not needed. Tell\nlockdep that. A detach from a registered device without RTNL still\nwarns.\n\nFixes: 35f7cad1743e (\"net: Add the possibility to support a selected hwtstamp in netdevice\")\nReported-by: syzbot+583f42a41879bb60de32@syzkaller.appspotmail.com\nCloses: https://syzkaller.appspot.com/bug?extid\u003d583f42a41879bb60de32\nSigned-off-by: Nguyen Ngoc Thang \u003cngocthang2710.1999@gmail.com\u003e\nReviewed-by: Kory Maincent \u003ckory.maincent@bootlin.com\u003e\nLink: https://patch.msgid.link/20261029142423.93573-1-ngocthang2710.1999@gmail.com\nSigned-off-by: Paolo Abeni \u003cpabeni@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5d4508bcfbe9911ce485736a4fbbc39c26d8e3b8",
      "old_mode": 33188,
      "old_path": "drivers/net/phy/phy_device.c",
      "new_id": "06c5a8c8cc2a2e94301c8cf9012830f9cb8e6acc",
      "new_mode": 33188,
      "new_path": "drivers/net/phy/phy_device.c"
    }
  ]
}
