Public bug reported:

[Impact]
After enable CONFIG_DEBUG_KMEMLEAK, Kmemleak detects potential leak.

root@mtk-genio:/home/gjiang# cat /sys/kernel/debug/kmemleak
unreferenced object 0xffff0000dad64400 (size 512):
  comm "kworker/u16:3", pid 146, jiffies 4294896229 (age 8550.412s)
  hex dump (first 32 bytes):
    00 40 19 03 00 fc ff ff 00 00 00 00 00 00 10 00 .@..............
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  backtrace:
    [<00000000ce19c3ae>] __kmalloc+0x260/0x410
    [<00000000a3612fef>] sg_alloc_append_table_from_pages+0x324/0x490
    [<0000000058fcc8b7>] sg_alloc_table_from_pages_segment+0x3c/0x114
    [<00000000a37ae8d3>] iommu_dma_get_sgtable+0xa4/0x110
    [<000000002c697e39>] dma_get_sgtable_attrs+0x28/0x50
    [<000000000872c5af>] mtk_gem_prime_get_sg_table+0x64/0xc0
    [<000000006b9e7591>] mtk_drm_gem_prime_vmap+0x60/0x130
    [<00000000b73a0770>] drm_gem_vmap+0x2c/0x90
    [<0000000034e08004>] drm_client_buffer_vmap+0x2c/0x4c
    [<00000000bff437f7>] drm_fb_helper_generic_probe+0x178/0x230
    [<00000000dcd73dff>] drm_fb_helper_single_fb_probe+0x2cc/0x530
    [<000000001980a8a1>] __drm_fb_helper_initial_config_and_unlock+0x48/0x140
    [<000000007b1bea4e>] drm_fbdev_client_hotplug+0x13c/0x18c
    [<00000000a7d9a8ba>] drm_client_register+0x64/0xa4
    [<00000000106a744f>] drm_fbdev_generic_setup+0xd0/0x19c
    [<0000000070423ecc>] mtk_drm_bind+0x11c/0x1a0

[Fix]
https://lore.kernel.org/lkml/68a9a139-922b-93ae-0f4d-ee36b3610...@loongson.cn/T/
https://lore.kernel.org/linux-arm-kernel/20231004083226.1940055-1-we...@chromium.org/

[Test]
1. enable CONFIG_DEBUG_KMEMLEAK
2. cat /sys/kernel/debug/kmemleak

[Where problems could occur]
none. the chance should be low.

LP: #2073823

** Affects: linux-mtk (Ubuntu)
     Importance: Undecided
     Assignee: Jian Hui Lee (jianhuilee)
         Status: New

** Affects: linux-mtk (Ubuntu Jammy)
     Importance: Undecided
     Assignee: Jian Hui Lee (jianhuilee)
         Status: New

** Also affects: linux-mtk (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Changed in: linux-mtk (Ubuntu)
     Assignee: (unassigned) => Jian Hui Lee (jianhuilee)

** Changed in: linux-mtk (Ubuntu Jammy)
     Assignee: (unassigned) => Jian Hui Lee (jianhuilee)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-mtk in Ubuntu.
https://bugs.launchpad.net/bugs/2081686

Title:
   [g1200] possible kernel memory leak through CONFIG_DEBUG_KMEMLEAK

Status in linux-mtk package in Ubuntu:
  New
Status in linux-mtk source package in Jammy:
  New

Bug description:
  [Impact]
  After enable CONFIG_DEBUG_KMEMLEAK, Kmemleak detects potential leak.

  root@mtk-genio:/home/gjiang# cat /sys/kernel/debug/kmemleak
  unreferenced object 0xffff0000dad64400 (size 512):
    comm "kworker/u16:3", pid 146, jiffies 4294896229 (age 8550.412s)
    hex dump (first 32 bytes):
      00 40 19 03 00 fc ff ff 00 00 00 00 00 00 10 00 .@..............
      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    backtrace:
      [<00000000ce19c3ae>] __kmalloc+0x260/0x410
      [<00000000a3612fef>] sg_alloc_append_table_from_pages+0x324/0x490
      [<0000000058fcc8b7>] sg_alloc_table_from_pages_segment+0x3c/0x114
      [<00000000a37ae8d3>] iommu_dma_get_sgtable+0xa4/0x110
      [<000000002c697e39>] dma_get_sgtable_attrs+0x28/0x50
      [<000000000872c5af>] mtk_gem_prime_get_sg_table+0x64/0xc0
      [<000000006b9e7591>] mtk_drm_gem_prime_vmap+0x60/0x130
      [<00000000b73a0770>] drm_gem_vmap+0x2c/0x90
      [<0000000034e08004>] drm_client_buffer_vmap+0x2c/0x4c
      [<00000000bff437f7>] drm_fb_helper_generic_probe+0x178/0x230
      [<00000000dcd73dff>] drm_fb_helper_single_fb_probe+0x2cc/0x530
      [<000000001980a8a1>] __drm_fb_helper_initial_config_and_unlock+0x48/0x140
      [<000000007b1bea4e>] drm_fbdev_client_hotplug+0x13c/0x18c
      [<00000000a7d9a8ba>] drm_client_register+0x64/0xa4
      [<00000000106a744f>] drm_fbdev_generic_setup+0xd0/0x19c
      [<0000000070423ecc>] mtk_drm_bind+0x11c/0x1a0

  [Fix]
  
https://lore.kernel.org/lkml/68a9a139-922b-93ae-0f4d-ee36b3610...@loongson.cn/T/
  
https://lore.kernel.org/linux-arm-kernel/20231004083226.1940055-1-we...@chromium.org/

  [Test]
  1. enable CONFIG_DEBUG_KMEMLEAK
  2. cat /sys/kernel/debug/kmemleak

  [Where problems could occur]
  none. the chance should be low.

  LP: #2073823

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-mtk/+bug/2081686/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to