From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: daniel.lezcano@linaro.org, rui.zhang@intel.com
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
m.szyprowski@samsung.com, amit.kucheria@linaro.org
Subject: [PATCH 2/2] thermal: core: Move initialization after core initcall
Date: Fri, 17 Jul 2020 18:42:17 +0200 [thread overview]
Message-ID: <20200717164217.18819-2-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <20200717164217.18819-1-daniel.lezcano@linaro.org>
The generic netlink is initialized at subsys_initcall, so far after
the thermal init routine and the thermal generic netlink family
initialization.
On ŝome platforms, that leads to a memory corruption.
The fix was sent to netdev@ to move the genetlink framework
initialization at core_initcall.
Move the thermal core initialization to postcore level which is very
close to core level.
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/thermal/thermal_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index c2e7d7aaa354..79551bb6cd4c 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -1617,4 +1617,4 @@ static int __init thermal_init(void)
mutex_destroy(&poweroff_lock);
return result;
}
-core_initcall(thermal_init);
+postcore_initcall(thermal_init);
--
2.17.1
next prev parent reply other threads:[~2020-07-17 16:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 16:42 [PATCH 1/2] thermal: netlink: Improve the initcall ordering Daniel Lezcano
2020-07-17 16:42 ` Daniel Lezcano [this message]
2020-07-20 5:39 ` [PATCH 2/2] thermal: core: Move initialization after core initcall Amit Kucheria
2020-07-20 5:43 ` [PATCH 1/2] thermal: netlink: Improve the initcall ordering Amit Kucheria
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=20200717164217.18819-2-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amit.kucheria@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=rui.zhang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).