From: Greg Kroah-Hartman Date: Thu, 2 Jan 2020 18:43:06 +0000 (+0100) Subject: drop clk-fix-memory-leak-in-clk_unregister.patch from 5.4 X-Git-Tag: v4.4.208~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d05e1ce44df19adec795d2fc8414f6547c815c05;p=thirdparty%2Fkernel%2Fstable-queue.git drop clk-fix-memory-leak-in-clk_unregister.patch from 5.4 --- diff --git a/queue-5.4/clk-fix-memory-leak-in-clk_unregister.patch b/queue-5.4/clk-fix-memory-leak-in-clk_unregister.patch deleted file mode 100644 index 45247475b4d..00000000000 --- a/queue-5.4/clk-fix-memory-leak-in-clk_unregister.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 1eccd3bcfd1142d1a8de126ed1e14c4f533400d6 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 22 Oct 2019 12:41:53 +0530 -Subject: clk: Fix memory leak in clk_unregister() - -From: Kishon Vijay Abraham I - -[ Upstream commit 8247470772beb38822f226c99a2ed8c195f6b438 ] - -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 -Cc: Tero Kristo -Signed-off-by: Kishon Vijay Abraham I -Link: https://lkml.kernel.org/r/20191022071153.21118-1-kishon@ti.com -Fixes: 1df4046a93e0 ("clk: Combine __clk_get() and __clk_create_clk()") -Signed-off-by: Stephen Boyd -Signed-off-by: Sasha Levin ---- - drivers/clk/clk.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c -index 1c677d7f7f53..2f2eea26c375 100644 ---- a/drivers/clk/clk.c -+++ b/drivers/clk/clk.c -@@ -3879,6 +3879,7 @@ void clk_unregister(struct clk *clk) - __func__, clk->core->name); - - kref_put(&clk->core->ref, __clk_release); -+ free_clk(clk); - unlock: - clk_prepare_unlock(); - } --- -2.20.1 - diff --git a/queue-5.4/series b/queue-5.4/series index 162eec31829..af66483e33e 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -84,7 +84,6 @@ watchdog-imx7ulp-fix-reboot-hang.patch watchdog-prevent-deferral-of-watchdogd-wakeup-on-rt.patch watchdog-fix-the-race-between-the-release-of-watchdo.patch powerpc-fixmap-use-__fix_to_virt-instead-of-fix_to_v.patch -clk-fix-memory-leak-in-clk_unregister.patch scsi-pm80xx-fix-for-sata-device-discovery.patch scsi-ufs-fix-error-handing-during-hibern8-enter.patch scsi-scsi_debug-num_tgts-must-be-0.patch