-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[Backport v2.7-branch] kernel shell, stacks shell commands: always use k_thread_foreach_unlocked #64658
Conversation
call k_thread_foreach_unlocked to avoid assertions caused by calling shell_print while holding a global lock Signed-off-by: Maxim Adelman <[email protected]> (cherry picked from commit ecf2cb5)
@jakub-uC - I think this one might require your approval |
@jakub-uC - just a gentle ping again. Does this backport look OK to you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, upon revisiting this, I think we need to exclusively use the unlocked
variant here, which would mirror main
.
zephyr/subsys/shell/modules/kernel_service.c
Line 201 in ebbf672
k_thread_foreach_unlocked(shell_tdata_dump, (void *)sh); |
@finikorg - would you be able to do perform the necessary rework? |
Is backport assumes we backport existing changes only? |
Yeah, technically, I guess that's the case - so maybe cherry-picking multiple commits would be better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change itself is fine for me. I apologize, I've missed this PR.
4c731f2 has been cherry-picked on top of the original commit which reflects what is in |
Always use k_thread_foreach_unlocked with callbacks which print something out to the shell, as they might call arch_irq_unlock. Fixes #66660. Signed-off-by: Benedikt Schmidt <[email protected]> (cherry picked from commit 4c731f2)
dd63f90
to
1d73bfa
Compare
call k_thread_foreach_unlocked to avoid assertions caused by calling shell_print while holding a global lock
Fixes #32145