public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Possible kernel memory leaks
@ 2006-05-28 10:31 Catalin Marinas
  2006-05-30 17:00 ` Catalin Marinas
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Catalin Marinas @ 2006-05-28 10:31 UTC (permalink / raw)
  To: linux-kernel

Hi,

There are some possible kernel memory leaks discovered by kmemleak. I
didn't have time for investigating them. Please let me know if they are
not leaks so that I can improve kmemleak (or just add a false alarm call):

- acpi_evaluate_integer in drivers/acpi/utils.c - "element" is not freed
on the error path (if Coverity hasn't seen this, it was probably
confused by the return_* macros)

- acpi_ev_execute_reg_method in drivers/acpi/events/evregion.c - I'm not
sure about this but kmemleak reports an orphan pointer on the following
allocation path:
  c0159372: <kmem_cache_alloc>
  c01ffa07: <acpi_os_acquire_object>
  c0215b3a: <acpi_ut_allocate_object_desc_dbg>
  c02159ce: <acpi_ut_create_internal_object_dbg>
  c0203784: <acpi_ev_execute_reg_method>
  c0203db4: <acpi_ev_reg_run>
  c020ed17: <acpi_ns_walk_namespace>
  c0203d6b: <acpi_ev_execute_reg_methods>
Is acpi_ut_remove_reference actually removing the params[0/1]?

And some new false positives (kmemleak needs fixing):

- legacy_init_iomem_resources in arch/i386/kernel/setup.c - kmemleak is
probably right here in that "res" can never be freed since the pointer
was lost. However, there is no need to free this resource and that's why
I'll add a false alarm call

- there are a lot of false positives caused by module loading. I would
need to investigate these a bit more (it's missing a root memory block
that can lead to the reported pointers; it's also missing the static
variables in module)

Thanks,

Catalin

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

end of thread, other threads:[~2006-06-02  9:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-28 10:31 Possible kernel memory leaks Catalin Marinas
2006-05-30 17:00 ` Catalin Marinas
2006-05-30 17:03 ` [PATCH] Fix the memory leak in acpi_evaluate_integer() Catalin Marinas
2006-05-31 13:47 ` Possible kernel memory leaks Catalin Marinas
2006-06-02  9:41   ` Catalin Marinas

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