/* Return value: 0 on success / other on failure  */
static int cmm_set_disable(const char *val, struct kernel_param *kp)
/* Return value: 0 on success / other on failure  */
static int cmm_set_disable(const char *val, struct kernel_param *kp)
{
	int disable = simple_strtoul(val, NULL, 10);
	if (disable != 0 && disable != 1)
		return -EINVAL;
	if (disable && !cmm_disabled) {
		if (cmm_thread_ptr)
			kthread_stop(cmm_thread_ptr);
		cmm_thread_ptr = NULL;
		cmm_free_pages(loaned_pages);
	} else if (!disable && cmm_disabled) {
		cmm_thread_ptr = kthread_run(cmm_thread, NULL, "cmmthread");
		if (IS_ERR(cmm_thread_ptr))
			return PTR_ERR(cmm_thread_ptr);
	}
	cmm_disabled = disable;
	return 0;
}