)]}'
{
  "commit": "046e3bbc6bebe305d264f46620cc66f9b149f6d4",
  "tree": "57dbdb900f27a58a71c75b5ad0e6ad75780afd17",
  "parents": [
    "66ab1aaedb3e3d9a0a64ce4c87947f0097a14133"
  ],
  "author": {
    "name": "Ye Bin",
    "email": "yebin10@huawei.com",
    "time": "Thu Oct 24 09:55:20 2024 +0800"
  },
  "committer": {
    "name": "Kevin Berry",
    "email": "kpberry@google.com",
    "time": "Tue Feb 11 11:59:50 2025 -0800"
  },
  "message": "svcrdma: fix miss destroy percpu_counter in svc_rdma_proc_init()\n\n[ Upstream commit ce89e742a4c12b20f09a43fec1b21db33f2166cd ]\n\nThere\u0027s issue as follows:\nRPC: Registered rdma transport module.\nRPC: Registered rdma backchannel transport module.\nRPC: Unregistered rdma transport module.\nRPC: Unregistered rdma backchannel transport module.\nBUG: unable to handle page fault for address: fffffbfff80c609a\nPGD 123fee067 P4D 123fee067 PUD 123fea067 PMD 10c624067 PTE 0\nOops: Oops: 0000 [#1] PREEMPT SMP KASAN NOPTI\nRIP: 0010:percpu_counter_destroy_many+0xf7/0x2a0\nCall Trace:\n \u003cTASK\u003e\n __die+0x1f/0x70\n page_fault_oops+0x2cd/0x860\n spurious_kernel_fault+0x36/0x450\n do_kern_addr_fault+0xca/0x100\n exc_page_fault+0x128/0x150\n asm_exc_page_fault+0x26/0x30\n percpu_counter_destroy_many+0xf7/0x2a0\n mmdrop+0x209/0x350\n finish_task_switch.isra.0+0x481/0x840\n schedule_tail+0xe/0xd0\n ret_from_fork+0x23/0x80\n ret_from_fork_asm+0x1a/0x30\n \u003c/TASK\u003e\n\nIf register_sysctl() return NULL, then svc_rdma_proc_cleanup() will not\ndestroy the percpu counters which init in svc_rdma_proc_init().\nIf CONFIG_HOTPLUG_CPU is enabled, residual nodes may be in the\n\u0027percpu_counters\u0027 list. The above issue may occur once the module is\nremoved. If the CONFIG_HOTPLUG_CPU configuration is not enabled, memory\nleakage occurs.\nTo solve above issue just destroy all percpu counters when\nregister_sysctl() return NULL.\n\nBUG\u003db/394276011\nTEST\u003dpresubmit\nRELEASE_NOTE\u003dFixed CVE-2024-53215 in the Linux kernel.\n\ncos-patch: security-moderate\nFixes: 1e7e55731628 (\"svcrdma: Restore read and write stats\")\nFixes: 22df5a22462e (\"svcrdma: Convert rdma_stat_sq_starve to a per-CPU counter\")\nFixes: df971cd853c0 (\"svcrdma: Convert rdma_stat_recv to a per-CPU counter\")\nSigned-off-by: Ye Bin \u003cyebin10@huawei.com\u003e\nSigned-off-by: Chuck Lever \u003cchuck.lever@oracle.com\u003e\nSigned-off-by: Sasha Levin \u003csashal@kernel.org\u003e\nChange-Id: I1a5ed9a48c06764a3b69778c2d3aac9849f65984\nReviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/92861\nTested-by: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\nReviewed-by: Michael Kochera \u003ckochera@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f0d5eeed4c886f2d63cf6a83f4ed8add3c5ac9d8",
      "old_mode": 33188,
      "old_path": "net/sunrpc/xprtrdma/svc_rdma.c",
      "new_id": "e1d4e426b21fa9eab4a4b29c86fd10cab066878f",
      "new_mode": 33188,
      "new_path": "net/sunrpc/xprtrdma/svc_rdma.c"
    }
  ]
}
