Commit 383439d3 authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Peter Zijlstra
Browse files

livepatch: Skip task_call_func() for current task

parent e92606fa
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -312,7 +312,11 @@ static bool klp_try_switch_task(struct task_struct *task)
	 * functions.  If all goes well, switch the task to the target patch
	 * state.
	 */
	if (task == current)
		ret = klp_check_and_switch_task(current, &old_name);
	else
		ret = task_call_func(task, klp_check_and_switch_task, &old_name);

	switch (ret) {
	case 0:		/* success */
		break;