ftrace: break out modify loop immediately on detection of error
Impact: added precaution on failure detection Break out of the modifying loop as soon as a failure is detected. This is just an added precaution found by code review and was not found by any bug chasing. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
This commit is contained in:
@@ -561,8 +561,11 @@ static void ftrace_replace_code(int enable)
|
|||||||
if ((system_state == SYSTEM_BOOTING) ||
|
if ((system_state == SYSTEM_BOOTING) ||
|
||||||
!core_kernel_text(rec->ip)) {
|
!core_kernel_text(rec->ip)) {
|
||||||
ftrace_free_rec(rec);
|
ftrace_free_rec(rec);
|
||||||
} else
|
} else {
|
||||||
ftrace_bug(failed, rec->ip);
|
ftrace_bug(failed, rec->ip);
|
||||||
|
/* Stop processing */
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user