/* Start the automatic memory scanning thread. This function must be called with the scan_mutex held.  */
static void start_scan_thread(void)
/* Start the automatic memory scanning thread. This function must be called with the scan_mutex held.  */
static void start_scan_thread(void)
{
	if (scan_thread)
		return;
	scan_thread = kthread_run(kmemleak_scan_thread, NULL, "kmemleak");
	if (IS_ERR(scan_thread)) {
		pr_warning("Failed to create the scan thread\n");
		scan_thread = NULL;
	}
}