Skip to content
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

Fix dshot cancel race #29409

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

andyp1per
Copy link
Collaborator

@andyp1per andyp1per commented Mar 2, 2025

Alternative to #29379 fixes #29370

This ensures dshot_waiter is only manipulated inside a system lock. Tested on a Pavo20Pro

@andyp1per andyp1per requested a review from tridge March 2, 2025 09:26
@andyp1per andyp1per added the BUG label Mar 2, 2025
@@ -496,6 +496,11 @@ __RAMFUNC__ void RCOutput::bdshot_finish_dshot_gcr_transaction(virtual_timer_t*
#ifdef HAL_GPIO_LINE_GPIO56
TOGGLE_PIN_DEBUG(56);
#endif
if (group->dshot_waiter == nullptr) { // transaction was cancelled, leave everything alone
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this change won't work, when the bug happens 'this' is nullptr, so we are checking an incorrect memory location

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AP-4.6.0: TradHeli internal errors 0X4000000 and 0X4000020
2 participants