cpuidle_cooling_register use after free
Just got a use after free warning in the 5.3-rc6 kernel
[ 1.151665] ------------[ cut here ]------------
[ 1.156497] refcount_t: increment on 0; use-after-free.
[ 1.162008] WARNING: CPU: 2 PID: 1 at lib/refcount.c:156 refcount_inc_checked+0x40/0x48
[ 1.170345] Modules linked in:
[ 1.173534] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.3.0-rc6-00111-g8d6dae86 #222 (closed)
[ 1.181961] Hardware name: Purism Librem 5 devkit (DT)
[ 1.187316] pstate: 80000005 (Nzcv daif -PAN -UAO)
[ 1.192310] pc : refcount_inc_checked+0x40/0x48
[ 1.197032] lr : refcount_inc_checked+0x40/0x48
[ 1.201751] sp : ffff8000a7d5fc90
[ 1.205205] x29: ffff8000a7d5fc90 x28: 0000000000000000
[ 1.210741] x27: ffff8000a7d5fd10 x26: ffff000010d68000
[ 1.216278] x25: ffff000010d68f70 x24: ffff000010d68000
[ 1.221814] x23: 0000000000000000 x22: ffff000010e72060
[ 1.227351] x21: 0000000000000000 x20: 0000000000000000
[ 1.232887] x19: ffff8000a7eafe00 x18: ffffffffffffffff
[ 1.238423] x17: 0000000000000001 x16: 0000000000000000
[ 1.243959] x15: ffff000010d685c8 x14: ffff800127d5f997
[ 1.249495] x13: ffff8000a7d5f9a5 x12: ffff000010d88000
[ 1.255031] x11: 0000000005f5e0ff x10: ffff000010d685f0
[ 1.260567] x9 : ffff000010d46018 x8 : 000000000000052b
[ 1.266103] x7 : 0000000000000006 x6 : 0000000000000001
[ 1.271639] x5 : ffff00001010cbe4 x4 : 0000000000000001
[ 1.277175] x3 : 0000000000000001 x2 : ffff8000a7d80000
[ 1.282711] x1 : d5e73df49852f500 x0 : 0000000000000000
[ 1.288247] Call trace:
[ 1.290800] refcount_inc_checked+0x40/0x48
[ 1.295165] cpuidle_cooling_register+0x138/0x2ac
[ 1.300068] arm_idle_init+0x130/0x190
[ 1.303979] do_one_initcall+0x50/0x298
[ 1.307980] kernel_init_freeable+0x300/0x3a4
[ 1.312523] kernel_init+0x18/0x110
[ 1.316160] ret_from_fork+0x10/0x1c
[ 1.319890] ---[ end trace 469e581645c9b0ba ]---