Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions driver/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,6 @@ static int ppm_release(struct inode *inode, struct file *filp)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20)
tracepoint_synchronize_unregister();
#endif
g_tracepoints_attached = 0;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are already cleaning up g_tracepoints_attached bits in force_tp_set.


/*
* Reset tracepoint counter
Expand Down Expand Up @@ -744,7 +743,18 @@ static int force_tp_set(u32 new_tp_set, u32 max_val)
}
else
{
pr_err("can't create the %s tracepoint\n", tp_names[idx]);
pr_err("can't attach the %s tracepoint\n", tp_names[idx]);
}
}
else
{
if (ret == 0)
{
g_tracepoints_attached &= ~(1 << idx);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually clean up disabled tp bits.

}
else
{
pr_err("can't detach the %s tracepoint\n", tp_names[idx]);
}
}
}
Expand Down