8000 sorting: add race condition checks for queues usage by AlonZivony · Pull Request #2465 · aquasecurity/tracee · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sorting: add race condition checks for queues usage #2465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

AlonZivony
Copy link
Contributor
@AlonZivony AlonZivony commented Dec 11, 2022

Initial Checklist

  • There is an issue describing the need for this PR.
  • Git log contains summary of the change.
  • Git log contains motivation and context of the change.
  • If part of an EPIC, PR git log contains EPIC number.
  • If part of an EPIC, PR was added to EPIC description.

Description (git log)

In multiple places in the sorting feature, there was an assumption that the queues don't change between atomic operations. There are also places that doesn't check call success at all. Now we check before usage in found problematic places the integrity of queue operations results.

Fixes: #2449

Type of change

  • Bug fix (non-breaking change fixing an issue, preferable).
  • Quick fix (minor non-breaking change requiring no issue, use with care)
  • Code refactor (code improvement and/or code removal)
  • New feature (non-breaking change adding functionality).
  • Breaking change (cause existing functionality not to work as expected).

Final Checklist:

Pick "Bug Fix" or "Feature", delete the other and mark appropriate checks.

  • I have made corresponding changes to the documentation.
  • My code follows the style guidelines (C and Go) of this project.
  • I have performed a self-review of my own code.
  • I have commented all functions/methods created explaining what they do.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.
  • I have added tests that prove my fix, or feature, is effective.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published before.

Git Log Checklist:

My commits logs have:

  • Subject starts with "subsystem|file: description".
  • Do not end the subject line with a period.
  • Limit the subject line to 50 characters.
  • Separate subject from body with a blank line.
  • Use the imperative mood in the subject line.
  • Wrap the body at 72 characters.
  • Use the body to explain what and why instead of how.

@AlonZivony AlonZivony force-pushed the bugfix/sorting-race-conditions branch from 944ad63 to 10b4c57 Compare December 11, 2022 13:10
In multiple places in the sorting feature, there was an assumption that
the queues don't change between atomic operations.
There are also places that doesn't check call success at all.
Now we check before usage in found problematic places the integrity
of queue operations results.
@AlonZivony AlonZivony force-pushed the bugfix/sorting-race-conditions branch from 10b4c57 to a998659 Compare December 11, 2022 14:21
@AlonZivony AlonZivony added this to the v0.10.0 milestone Dec 13, 2022
Copy link
Contributor
@rafaeldtinoco rafaeldtinoco left a comment

Choose a reason for hiding this comment

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

LGTM

@rafaeldtinoco rafaeldtinoco merged commit 6ece39e into aquasecurity:main Dec 13, 2022
@yanivagman yanivagman removed this from the v0.10.0 milestone Jan 2, 2023
@AlonZivony AlonZivony deleted the bugfix/sorting-race-conditions branch February 2, 2023 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Sorting Events nil pointer dereference
3 participants
0