mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
tracing: fix oops in tracepoint_update_probe_range()
Change this crash: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffff8107d4de>] tracepoint_update_probe_range+0x1f/0x9b PGD 13d5fb067 PUD 13d688067 PMD 0 Oops: 0000 [#1] SMP To a more debuggable WARN_ONCE(). Signed-off-by: Jaswinder Singh Rajput <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Steven Rostedt <[email protected]> LKML-Reference: <[email protected]> [ moved the check outside the lock and added a WARN_ON(). ] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
4903620034
commit
09933a108e
1 changed files with 7 additions and 2 deletions
|
|
@ -272,12 +272,17 @@ static void disable_tracepoint(struct tracepoint *elem)
|
|||
*
|
||||
* Updates the probe callback corresponding to a range of tracepoints.
|
||||
*/
|
||||
void tracepoint_update_probe_range(struct tracepoint *begin,
|
||||
struct tracepoint *end)
|
||||
void
|
||||
tracepoint_update_probe_range(struct tracepoint *begin, struct tracepoint *end)
|
||||
{
|
||||
struct tracepoint *iter;
|
||||
struct tracepoint_entry *mark_entry;
|
||||
|
||||
if (!begin) {
|
||||
WARN_ON_ONCE(1);
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_lock(&tracepoints_mutex);
|
||||
for (iter = begin; iter < end; iter++) {
|
||||
mark_entry = get_tracepoint(iter->name);
|
||||
|
|
|
|||
Loading…
Reference in a new issue