* [PATCH 4.14 058/121] SoC: imx-sgtl5000: add missing put_device()
[not found] <20190404084545.245659903@linuxfoundation.org>
@ 2019-04-04 8:47 ` Greg Kroah-Hartman
2019-04-04 8:48 ` [PATCH 4.14 105/121] cpu/hotplug: Mute hotplug lockdep during init Greg Kroah-Hartman
1 sibling, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2019-04-04 8:47 UTC (permalink / raw)
To: linux-kernel
Cc: Sasha Levin, alsa-devel, linuxppc-dev, Timur Tabi, Xiubo Li,
Greg Kroah-Hartman, Sascha Hauer, Takashi Iwai, Liam Girdwood,
stable, Jaroslav Kysela, Nicolin Chen, Mark Brown, NXP Linux Team,
Pengutronix Kernel Team, Wen Yang, Shawn Guo, Fabio Estevam,
linux-arm-kernel
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
[ Upstream commit 8fa857da9744f513036df1c43ab57f338941ae7d ]
The of_find_device_by_node() takes a reference to the underlying device
structure, we should release that reference.
Detected by coccinelle with the following warnings:
./sound/soc/fsl/imx-sgtl5000.c:169:1-7: ERROR: missing put_device;
call of_find_device_by_node on line 105, but without a corresponding
object release within this function.
./sound/soc/fsl/imx-sgtl5000.c:177:1-7: ERROR: missing put_device;
call of_find_device_by_node on line 105, but without a corresponding
object release within this function.
Signed-off-by: Wen Yang <yellowriver2010@hotmail•com>
Cc: Timur Tabi <timur@kernel•org>
Cc: Nicolin Chen <nicoleotsuka@gmail•com>
Cc: Xiubo Li <Xiubo.Lee@gmail•com>
Cc: Fabio Estevam <festevam@gmail•com>
Cc: Liam Girdwood <lgirdwood@gmail•com>
Cc: Mark Brown <broonie@kernel•org>
Cc: Jaroslav Kysela <perex@perex•cz>
Cc: Takashi Iwai <tiwai@suse•com>
Cc: Shawn Guo <shawnguo@kernel•org>
Cc: Sascha Hauer <s.hauer@pengutronix•de>
Cc: Pengutronix Kernel Team <kernel@pengutronix•de>
Cc: NXP Linux Team <linux-imx@nxp•com>
Cc: alsa-devel@alsa-project•org
Cc: linuxppc-dev@lists•ozlabs.org
Cc: linux-arm-kernel@lists•infradead.org
Cc: linux-kernel@vger•kernel.org
Signed-off-by: Mark Brown <broonie@kernel•org>
Signed-off-by: Sasha Levin <sashal@kernel•org>
---
sound/soc/fsl/imx-sgtl5000.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index b99e0b5e00e9..8e525f7ac08d 100644
--- a/sound/soc/fsl/imx-sgtl5000.c
+++ b/sound/soc/fsl/imx-sgtl5000.c
@@ -115,6 +115,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
ret = -EPROBE_DEFER;
goto fail;
}
+ put_device(&ssi_pdev->dev);
codec_dev = of_find_i2c_device_by_node(codec_np);
if (!codec_dev) {
dev_err(&pdev->dev, "failed to find codec platform device\n");
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH 4.14 105/121] cpu/hotplug: Mute hotplug lockdep during init
[not found] <20190404084545.245659903@linuxfoundation.org>
2019-04-04 8:47 ` [PATCH 4.14 058/121] SoC: imx-sgtl5000: add missing put_device() Greg Kroah-Hartman
@ 2019-04-04 8:48 ` Greg Kroah-Hartman
1 sibling, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2019-04-04 8:48 UTC (permalink / raw)
To: linux-kernel
Cc: mark.rutland, Sasha Levin, cai, Peter Zijlstra,
Greg Kroah-Hartman, daniel.lezcano, Will Deacon, stable,
dietmar.eggemann, marc.zyngier, Ingo Molnar, Thomas Gleixner,
longman, Andrew Morton, Paul E. McKenney, Linus Torvalds,
Valentin Schneider, linux-arm-kernel
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
[ Upstream commit ce48c457b95316b9a01b5aa9d4456ce820df94b4 ]
Since we've had:
commit cb538267ea1e ("jump_label/lockdep: Assert we hold the hotplug lock for _cpuslocked() operations")
we've been getting some lockdep warnings during init, such as on HiKey960:
[ 0.820495] WARNING: CPU: 4 PID: 0 at kernel/cpu.c:316 lockdep_assert_cpus_held+0x3c/0x48
[ 0.820498] Modules linked in:
[ 0.820509] CPU: 4 PID: 0 Comm: swapper/4 Tainted: G S 4.20.0-rc5-00051-g4cae42a #34
[ 0.820511] Hardware name: HiKey960 (DT)
[ 0.820516] pstate: 600001c5 (nZCv dAIF -PAN -UAO)
[ 0.820520] pc : lockdep_assert_cpus_held+0x3c/0x48
[ 0.820523] lr : lockdep_assert_cpus_held+0x38/0x48
[ 0.820526] sp : ffff00000a9cbe50
[ 0.820528] x29: ffff00000a9cbe50 x28: 0000000000000000
[ 0.820533] x27: 00008000b69e5000 x26: ffff8000bff4cfe0
[ 0.820537] x25: ffff000008ba69e0 x24: 0000000000000001
[ 0.820541] x23: ffff000008fce000 x22: ffff000008ba70c8
[ 0.820545] x21: 0000000000000001 x20: 0000000000000003
[ 0.820548] x19: ffff00000a35d628 x18: ffffffffffffffff
[ 0.820552] x17: 0000000000000000 x16: 0000000000000000
[ 0.820556] x15: ffff00000958f848 x14: 455f3052464d4d34
[ 0.820559] x13: 00000000769dde98 x12: ffff8000bf3f65a8
[ 0.820564] x11: 0000000000000000 x10: ffff00000958f848
[ 0.820567] x9 : ffff000009592000 x8 : ffff00000958f848
[ 0.820571] x7 : ffff00000818ffa0 x6 : 0000000000000000
[ 0.820574] x5 : 0000000000000000 x4 : 0000000000000001
[ 0.820578] x3 : 0000000000000000 x2 : 0000000000000001
[ 0.820582] x1 : 00000000ffffffff x0 : 0000000000000000
[ 0.820587] Call trace:
[ 0.820591] lockdep_assert_cpus_held+0x3c/0x48
[ 0.820598] static_key_enable_cpuslocked+0x28/0xd0
[ 0.820606] arch_timer_check_ool_workaround+0xe8/0x228
[ 0.820610] arch_timer_starting_cpu+0xe4/0x2d8
[ 0.820615] cpuhp_invoke_callback+0xe8/0xd08
[ 0.820619] notify_cpu_starting+0x80/0xb8
[ 0.820625] secondary_start_kernel+0x118/0x1d0
We've also had a similar warning in sched_init_smp() for every
asymmetric system that would enable the sched_asym_cpucapacity static
key, although that was singled out in:
commit 40fa3780bac2 ("sched/core: Take the hotplug lock in sched_init_smp()")
Those warnings are actually harmless, since we cannot have hotplug
operations at the time they appear. Instead of starting to sprinkle
useless hotplug lock operations in the init codepaths, mute the
warnings until they start warning about real problems.
Suggested-by: Peter Zijlstra <peterz@infradead•org>
Signed-off-by: Valentin Schneider <valentin.schneider@arm•com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead•org>
Cc: Andrew Morton <akpm@linux-foundation•org>
Cc: Linus Torvalds <torvalds@linux-foundation•org>
Cc: Paul E. McKenney <paulmck@linux•vnet.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix•de>
Cc: Will Deacon <will.deacon@arm•com>
Cc: cai@gmx•us
Cc: daniel.lezcano@linaro•org
Cc: dietmar.eggemann@arm•com
Cc: linux-arm-kernel@lists•infradead.org
Cc: longman@redhat•com
Cc: marc.zyngier@arm•com
Cc: mark.rutland@arm•com
Link: https://lkml.kernel.org/r/1545243796-23224-2-git-send-email-valentin.schneider@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel•org>
Signed-off-by: Sasha Levin <sashal@kernel•org>
---
kernel/cpu.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 32f0432f0c26..8c350dd81581 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -314,6 +314,15 @@ void cpus_write_unlock(void)
void lockdep_assert_cpus_held(void)
{
+ /*
+ * We can't have hotplug operations before userspace starts running,
+ * and some init codepaths will knowingly not take the hotplug lock.
+ * This is all valid, so mute lockdep until it makes sense to report
+ * unheld locks.
+ */
+ if (system_state < SYSTEM_RUNNING)
+ return;
+
percpu_rwsem_assert_held(&cpu_hotplug_lock);
}
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread