debugobjects: Free per CPU pool after CPU unplug
authorZqiang <qiang.zhang@windriver.com>
Tue, 8 Sep 2020 06:27:09 +0000 (14:27 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 1 Oct 2020 14:13:54 +0000 (16:13 +0200)
commit88451f2cd3cec2abc30debdf129422d2699d1eba
treeadde4c22e62edfd77bbbc8bee9579a37d75fa849
parentf9e62f318fd706a54b7ce9b28e5c7e49bbde8788
debugobjects: Free per CPU pool after CPU unplug

If a CPU is offlined the debug objects per CPU pool is not cleaned up. If
the CPU is never onlined again then the objects in the pool are wasted.

Add a CPU hotplug callback which is invoked after the CPU is dead to free
the pool.

[ tglx: Massaged changelog and added comment about remote access safety ]

Signed-off-by: Zqiang <qiang.zhang@windriver.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <longman@redhat.com>
Link: https://lore.kernel.org/r/20200908062709.11441-1-qiang.zhang@windriver.com
include/linux/cpuhotplug.h
lib/debugobjects.c