)]}'
{
  "commit": "5ae916fabca141b79b32e2e57f3c915c0f1e1b2e",
  "tree": "01a097b8505d85f37b10961979429e526053d28c",
  "parents": [
    "150dba2c69e93302af24a0c868eebe4871e2e107"
  ],
  "author": {
    "name": "Yige Jiang",
    "email": "yigejiang86@gmail.com",
    "time": "Sun Sep 13 14:41:02 2026 +0800"
  },
  "committer": {
    "name": "Jakub Kicinski",
    "email": "kuba@kernel.org",
    "time": "Wed Sep 16 17:32:15 2026 -0700"
  },
  "message": "net: netsec: fix device_node reference leak on phy_np\n\nnetsec_of_probe() takes a reference on the PHY device_node with\nof_parse_phandle() and stores it in priv-\u003ephy_np, but the driver never\ndrops it.  One device_node reference is leaked per probe, on the success\npath as well as on every error path reached after netsec_of_probe().\n\nNeither consumer takes ownership.  of_mdio_parse_addr() is a static\ninline taking a const struct device_node * that only reads the \"reg\"\nproperty.  of_phy_connect() borrows as well: of_phy_get_and_connect() in\ndrivers/net/mdio/of_mdio.c brackets its own call with of_node_get() at\n:364 and of_node_put() at :373, which would be a double put if\nof_phy_connect() consumed the reference.\n\nThe node is still in use at netsec_netdev_open() time, where it is\npassed to of_phy_connect(), so it has device lifetime.  Release it at\nthe probe error label, which every failure path after the acquire\nfunnels through, and in netsec_remove().  Both releases precede\nfree_netdev(), since priv is netdev_priv(ndev).  The ACPI probe path\nleaves priv-\u003ephy_np NULL and of_node_put(NULL) is a no-op.\n\nThere is no end-user visible symptom on currently supported platforms:\na device_node is only freed once OF_DYNAMIC is enabled and the node has\nbeen detached, so on a static device tree the imbalance is inert.  It is\nobservable as a refcount that grows across bind/unbind cycles, and would\nmatter under device tree overlays.\n\nFound by static analysis of reference acquire/release pairing rather\nthan from a runtime report.  No reproducer was produced and the change\nhas not been runtime tested; it is compile-tested only (arm64,\nCONFIG_SNI_NETSEC\u003dm via COMPILE_TEST).\n\nFixes: 533dd11a12f6 (\"net: socionext: Add Synquacer NetSec driver\")\nSigned-off-by: Yige Jiang \u003cyigejiang86@gmail.com\u003e\nReviewed-by: Simon Horman \u003chorms@kernel.org\u003e\nLink: https://patch.msgid.link/20260913064102.37452-1-yigejiang86@gmail.com\nSigned-off-by: Jakub Kicinski \u003ckuba@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d14a6584473c846a623cf4013c42792c661e99b3",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/socionext/netsec.c",
      "new_id": "79a0a324c921d799275b40930d2d179a3ec3f8ea",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/socionext/netsec.c"
    }
  ]
}
