mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix memory leak in coresight drivers
@ 2023-08-17  8:59 Junhao He
  2023-08-17  8:59 ` [PATCH 1/2] coresight: Fix memory leak in acpi_buffer->pointer Junhao He
  2023-08-17  8:59 ` [PATCH 2/2] coresight: core: fix memory leak in dict->fwnode_list Junhao He
  0 siblings, 2 replies; 13+ messages in thread
From: Junhao He @ 2023-08-17  8:59 UTC (permalink / raw)
  To: suzuki.poulose, mike.leach, leo.yan, james.clark
  Cc: coresight, linux-arm-kernel, linux-kernel, linuxarm,
	jonathan.cameron, yangyicong, prime.zeng, hejunhao3

When build kernel with CONFIG_KASAN=y
there are reports of memory leaks, like:
...
unreferenced object 0xffff2020510fe200 (size 64):
  comm "insmod", pid 4642, jiffies 4295983961 (age 46049.752s)
  hex dump (first 32 bytes):
    10 20 40 06 28 20 ff ff 10 40 7f 06 20 20 ff ff  . @.( ...@..  ..
    10 20 bb 8a 20 00 ff ff 10 e0 c7 8a 20 00 ff ff  . .. ....... ...
  backtrace:
    [<0000000034ec4724>] __kmem_cache_alloc_node+0x2f8/0x348
    [<0000000057fbc15d>] __kmalloc_node_track_caller+0x5c/0x110
    [<0000000055d5e34b>] krealloc+0x8c/0x178
    [<00000000a4635beb>] coresight_alloc_device_name+0x128/0x188 [coresight]
    [<000000000ce9d17b>] smb_probe+0x268/0x478 [ultrasoc_smb]
...
unreferenced object 0xffff00213c141000 (size 1024):
  comm "systemd-udevd", pid 2123, jiffies 4294909467 (age 6062.160s)
  hex dump (first 32 bytes):
    04 00 00 00 02 00 00 00 18 10 14 3c 21 00 ff ff  ...........<!...
    00 00 00 00 00 00 00 00 03 00 00 00 10 00 00 00  ................
  backtrace:
    [<000000004b7c9001>] __kmem_cache_alloc_node+0x2f8/0x348
    [<00000000b0fc7ceb>] __kmalloc+0x58/0x108
    [<0000000064ff4695>] acpi_os_allocate+0x2c/0x68
    [<000000007d57d116>] acpi_ut_initialize_buffer+0x54/0xe0
    [<0000000024583908>] acpi_evaluate_object+0x388/0x438
    [<0000000017b2e72b>] acpi_evaluate_object_typed+0xe8/0x240
    [<000000005df0eac2>] coresight_get_platform_data+0x1b4/0x988 [coresight]
...

The patchset based on "coresight: platform: acpi: Ignore the absence of graph"
https://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git/commit/?h=next&id=3a2888aa1f962c55ca36119aebe67355c7bf54e4

Junhao He (2):
  coresight: Fix memory leak in acpi_buffer->pointer
  coresight: core: fix memory leak in dict->fwnode_list

 drivers/hwtracing/coresight/coresight-core.c  | 20 +++++++++-
 .../hwtracing/coresight/coresight-platform.c  | 40 ++++++++++++-------
 2 files changed, 45 insertions(+), 15 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-08-18 11:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-17  8:59 [PATCH 0/2] Fix memory leak in coresight drivers Junhao He
2023-08-17  8:59 ` [PATCH 1/2] coresight: Fix memory leak in acpi_buffer->pointer Junhao He
2023-08-17 14:03   ` James Clark
2023-08-18 11:42     ` Suzuki K Poulose
2023-08-17  8:59 ` [PATCH 2/2] coresight: core: fix memory leak in dict->fwnode_list Junhao He
2023-08-17 14:31   ` James Clark
2023-08-17 14:46     ` Suzuki K Poulose
2023-08-17 14:39   ` Suzuki K Poulose
2023-08-17 14:46     ` James Clark
2023-08-17 14:49       ` Suzuki K Poulose
2023-08-17 14:47     ` Suzuki K Poulose
2023-08-17 15:01       ` James Clark
2023-08-18  9:15         ` Suzuki K Poulose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®