Skip to content

fix(driver/kmod): fixed tracepoint detach to avoid dmesg errors.#597

Merged
poiana merged 1 commit intomasterfrom
fix/kmod_detach_tp
Sep 12, 2022
Merged

fix(driver/kmod): fixed tracepoint detach to avoid dmesg errors.#597
poiana merged 1 commit intomasterfrom
fix/kmod_detach_tp

Conversation

@FedeDP
Copy link
Contributor

@FedeDP FedeDP commented Sep 12, 2022

What type of PR is this?

/kind bug

Any specific area of the project related to this PR?

/area driver-kmod

What this PR does / why we need it:

Avoid some dmesg errors by keeping g_tracepoints_attached in sync with real values.
Extracted from #582

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
@FedeDP
Copy link
Contributor Author

FedeDP commented Sep 12, 2022

/milestone 3.0.0+driver

@poiana poiana added this to the 3.0.0+driver milestone Sep 12, 2022
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20)
tracepoint_synchronize_unregister();
#endif
g_tracepoints_attached = 0;
Copy link
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.

{
if (ret == 0)
{
g_tracepoints_attached &= ~(1 << idx);
Copy link
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.

@poiana
Copy link
Contributor

poiana commented Sep 12, 2022

LGTM label has been added.

DetailsGit tree hash: 186a4a51cb23b6718484678c3dd44819aa325ef9

Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Contributor

poiana commented Sep 12, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP, leogr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [Andreagit97,FedeDP,leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit f885a15 into master Sep 12, 2022
@poiana poiana deleted the fix/kmod_detach_tp branch September 12, 2022 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants