)]}'
{
  "commit": "1abebf8624cc7d4e8a9bb2bccff8f0dc031fd549",
  "tree": "cfe97769ce1ee8d6b25ab3961586bc3c3ed462e7",
  "parents": [
    "7416e56928b66f2a00fd6b3bb45bfb9d1269296d"
  ],
  "author": {
    "name": "Shivaji Kant",
    "email": "shivajikant@google.com",
    "time": "Wed Oct 29 06:54:19 2025 +0000"
  },
  "committer": {
    "name": "Cloud Image Release",
    "email": "cloud-image-release@prod.google.com",
    "time": "Fri Oct 31 18:04:58 2025 -0700"
  },
  "message": "net: devmem: refresh devmem TX dst in case of route invalidation\n\n[ Netdev upstream commit 6a2108c78069fda000729b88c97b1eba0405e6d7 ]\n[ This needs an updated sha from upstream once the commit is merged]\n\nThe zero-copy Device Memory (Devmem) transmit path\nrelies on the socket\u0027s route cache (`dst_entry`) to\nvalidate that the packet is being sent via the network\ndevice to which the DMA buffer was bound.\n\nHowever, this check incorrectly fails and returns `-ENODEV`\nif the socket\u0027s route cache entry (`dst`) is merely missing\nor expired (`dst \u003d\u003d NULL`). This scenario is observed during\nnetwork events, such as when flow steering rules are deleted,\nleading to a temporary route cache invalidation.\n\nThis patch fixes -ENODEV error for `net_devmem_get_binding()`\nby doing the following:\n\n1.  It attempts to rebuild the route via `rebuild_header()`\nif the route is initially missing (`dst \u003d\u003d NULL`). This\nallows the TCP/IP stack to recover from transient route\ncache misses.\n2.  It uses `rcu_read_lock()` and `dst_dev_rcu()` to safely\naccess the network device pointer (`dst_dev`) from the\nroute, preventing use-after-free conditions if the\ndevice is concurrently removed.\n3.  It maintains the critical safety check by validating\nthat the retrieved destination device (`dst_dev`) is\nexactly the device registered in the Devmem binding\n(`binding-\u003edev`).\n\nThese changes prevent unnecessary ENODEV failures while\nmaintaining the critical safety requirement that the\nDevmem resources are only used on the bound network device.\n\nBUG\u003db/452457749\nTEST\u003dTcpxFunctionalTest\nRELEASE_NOTE\u003dFixed a TCPX bug which would sometimes incorrectly report devices as being missing when route cache entries were missing or invalidated.\n\ncos-patch: bug\nReviewed-by: Bobby Eshleman \u003cbobbyeshleman@meta.com\u003e\nReported-by: Eric Dumazet \u003cedumazet@google.com\u003e\nReported-by: Vedant Mathur \u003cvedantmathur@google.com\u003e\nSuggested-by: Eric Dumazet \u003cedumazet@google.com\u003e\nFixes: bd61848900bf (\"net: devmem: Implement TX path\")\nChange-Id: I14b2801731d7e24b224f50a3ee20379e58a4b350\nLink: https://git.kernel.org/netdev/net/c/6a2108c78069\nSigned-off-by: Shivaji Kant \u003cshivajikant@google.com\u003e\nReviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/116381\nTested-by: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\nMain-Branch-Verified: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\nReviewed-by: Pranjal Shrivastava \u003cpraan@google.com\u003e\nReviewed-by: Kevin Berry \u003ckpberry@google.com\u003e\nReviewed-by: Robert Kolchmeyer \u003crkolchmeyer@google.com\u003e\nReviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/116701\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0b4ca5665fd9b5c86a564eec47cc8474cf02b6a6",
      "old_mode": 33188,
      "old_path": "net/core/devmem.c",
      "new_id": "812a754bf5d611f68e374eb7ba8e71d5bbebc6a2",
      "new_mode": 33188,
      "new_path": "net/core/devmem.c"
    }
  ]
}
