mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
ed40fad9a5
In case there are no DT idle states defined or
cpuidle_register_driver() fails, the copy of the idle driver is leaked:
unreferenced object 0xede0dc00 (size 1024):
comm "swapper/0", pid 1, jiffies 4294937431 (age 744.510s)
hex dump (first 32 bytes):
94 9e 0b c1 00 00 00 00 00 00 00 00 00 00 00 00 ................
57 46 49 00 00 00 00 00 00 00 00 00 00 00 00 00 WFI.............
backtrace:
[<c1295f04>] arm_idle_init+0x44/0x1ac
[<c0301e6c>] do_one_initcall+0x3c/0x16c
[<c1200d70>] kernel_init_freeable+0x110/0x1d0
[<c0cb3624>] kernel_init+0x8/0x114
[<c0307a98>] ret_from_fork+0x14/0x3c
So fix this by freeing the unregistered copy in error case.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Fixes:
|
||
---|---|---|
.. | ||
governors | ||
coupled.c | ||
cpuidle-arm.c | ||
cpuidle-at91.c | ||
cpuidle-big_little.c | ||
cpuidle-calxeda.c | ||
cpuidle-clps711x.c | ||
cpuidle-cps.c | ||
cpuidle-exynos.c | ||
cpuidle-kirkwood.c | ||
cpuidle-mvebu-v7.c | ||
cpuidle-powernv.c | ||
cpuidle-pseries.c | ||
cpuidle-ux500.c | ||
cpuidle-zynq.c | ||
cpuidle.c | ||
cpuidle.h | ||
driver.c | ||
dt_idle_states.c | ||
dt_idle_states.h | ||
governor.c | ||
Kconfig | ||
Kconfig.arm | ||
Kconfig.mips | ||
Kconfig.powerpc | ||
Makefile | ||
poll_state.c | ||
sysfs.c |