)]}'
{
  "commit": "b4d0eb24145af4793d60c32a865450f53cd73438",
  "tree": "df3d38d303ae54ebc0caeac88d74129aee8094b1",
  "parents": [
    "fb70307d9346ad4c2cfbae06bb1ac67584aa3cd6"
  ],
  "author": {
    "name": "Leon Romanovsky",
    "email": "leonro@nvidia.com",
    "time": "Tue Oct 13 07:23:25 2026 -0400"
  },
  "committer": {
    "name": "Leon Romanovsky",
    "email": "leonro@nvidia.com",
    "time": "Tue Oct 13 07:37:51 2026 -0400"
  },
  "message": "dma-buf: Restore the scatterlist entry count before freeing\n\ndma_buf_phys_vec_to_sgt() clears orig_nents to mark the returned table\nas DMA-only. Since sg_free_table() uses orig_nents to walk and free the\nscatterlist, dma_buf_free_sgt() leaks the allocation on every successful\nmap/unmap cycle.\n\nRestore orig_nents from nents before freeing the table. The helper\nallocates the DMA list directly, so nents retains the allocation count,\nincluding for chained scatterlists.\n\n\nThe reported kmemleak output was:\n\nKMEMLEAK LEAK: 2 driver-related leak(s)\nKMEMLEAK LEAK: unreferenced object 0xff11000125ceff00 (size 32):\nKMEMLEAK LEAK:   comm dtr, pid 4432, jiffies 4295031027\nKMEMLEAK LEAK:   hex dump (first 32 bytes):\nKMEMLEAK LEAK:     02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................\nKMEMLEAK LEAK:     00 00 01 00 28 38 00 00 00 10 00 00 00 00 00 00  ....(8..........\nKMEMLEAK LEAK:   backtrace (crc 4e8077f2):\nKMEMLEAK LEAK:     __kmalloc_noprof+0x451/0x8b0\nKMEMLEAK LEAK:     __sg_alloc_table+0x2a0/0x4d0\nKMEMLEAK LEAK:     sg_alloc_table+0x24/0x170\nKMEMLEAK LEAK:     dma_buf_phys_vec_to_sgt+0x84f/0xed0\nKMEMLEAK LEAK:     0xffffffffa1ad21a8\nKMEMLEAK LEAK:     dma_buf_map_attachment+0x138/0x690\nKMEMLEAK LEAK:     ib_umem_dmabuf_map_pages+0x249/0xc90 [ib_core]\nKMEMLEAK LEAK:     0xffffffffa138f8d2\nKMEMLEAK LEAK:     0xffffffffa1396abe\nKMEMLEAK LEAK:     0xffffffffa1331a5f\nKMEMLEAK LEAK:     0xffffffffa13320dd\nKMEMLEAK LEAK:     0xffffffffa1ad696d\nKMEMLEAK LEAK:     0xffffffffa1acecc7\nKMEMLEAK LEAK:     0xffffffffa1acfd17\nKMEMLEAK LEAK:     __x64_sys_ioctl+0x72c/0x11f0\nKMEMLEAK LEAK:     do_syscall_64+0xa1/0x4f0\nKMEMLEAK LEAK: unreferenced object 0xff1100016dbf3a80 (size 32):\nKMEMLEAK LEAK:   comm dtr, pid 4432, jiffies 4295034705\nKMEMLEAK LEAK:   hex dump (first 32 bytes):\nKMEMLEAK LEAK:     02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................\nKMEMLEAK LEAK:     00 20 10 00 28 38 00 00 00 10 00 00 00 00 00 00  . ..(8..........\n\nFixes: 3aa31a8bb11e (\"dma-buf: provide phys_vec to scatter-gather mapping routine\")\nSigned-off-by: Leon Romanovsky \u003cleonro@nvidia.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "833be519e1e6a6cfa0b4b129d2c84f13972204b7",
      "old_mode": 33188,
      "old_path": "drivers/dma-buf/dma-buf-mapping.c",
      "new_id": "cbdf99cb0e056126db511e7892379f36eeecab7e",
      "new_mode": 33188,
      "new_path": "drivers/dma-buf/dma-buf-mapping.c"
    }
  ]
}
