From: Stephen Boyd <sboyd@kernel.org>
To: Kishon Vijay Abraham I <kishon@ti.com>,
Michael Turquette <mturquette@baylibre.com>
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
Kishon Vijay Abraham I <kishon@ti.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Tero Kristo <t-kristo@ti.com>
Subject: Re: [PATCH] clk: Fix memory leak in clk_unregister()
Date: Tue, 19 Nov 2019 14:19:12 -0800 [thread overview]
Message-ID: <20191119221913.4132E222DC@mail.kernel.org> (raw)
In-Reply-To: <20191022071153.21118-1-kishon@ti.com>
Quoting Kishon Vijay Abraham I (2019-10-22 00:11:53)
> Memory allocated in alloc_clk() for 'struct clk' and
> 'const char *con_id' while invoking clk_register() is never freed
> in clk_unregister(), resulting in kmemleak showing the following
> backtrace.
>
> backtrace:
> [<00000000546f5dd0>] kmem_cache_alloc+0x18c/0x270
> [<0000000073a32862>] alloc_clk+0x30/0x70
> [<0000000082942480>] __clk_register+0xc8/0x760
> [<000000005c859fca>] devm_clk_register+0x54/0xb0
> [<00000000868834a8>] 0xffff800008c60950
> [<00000000d5a80534>] platform_drv_probe+0x50/0xa0
> [<000000001b3889fc>] really_probe+0x108/0x348
> [<00000000953fa60a>] driver_probe_device+0x58/0x100
> [<0000000008acc17c>] device_driver_attach+0x6c/0x90
> [<0000000022813df3>] __driver_attach+0x84/0xc8
> [<00000000448d5443>] bus_for_each_dev+0x74/0xc8
> [<00000000294aa93f>] driver_attach+0x20/0x28
> [<00000000e5e52626>] bus_add_driver+0x148/0x1f0
> [<000000001de21efc>] driver_register+0x60/0x110
> [<00000000af07c068>] __platform_driver_register+0x40/0x48
> [<0000000060fa80ee>] 0xffff800008c66020
>
> Fix it here.
>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Tero Kristo <t-kristo@ti.com>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
Applied to clk-next
I also added a fixes tag for the best I could guess.
prev parent reply other threads:[~2019-11-19 22:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 7:11 [PATCH] clk: Fix memory leak in clk_unregister() Kishon Vijay Abraham I
2019-10-22 18:51 ` Stephen Boyd
2019-10-29 11:06 ` [PATCH v2] " Kishon Vijay Abraham I
2019-10-29 11:08 ` Kishon Vijay Abraham I
2019-11-19 22:19 ` Stephen Boyd [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191119221913.4132E222DC@mail.kernel.org \
--to=sboyd@kernel.org \
--cc=kishon@ti.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=t-kristo@ti.com \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.