rqspinlock: Fix order in raw_res_spin_(un)lock_irq to allow schedule#8031
Open
kernel-patches-daemon-bpf-rc[bot] wants to merge 1 commit into
Open
rqspinlock: Fix order in raw_res_spin_(un)lock_irq to allow schedule#8031kernel-patches-daemon-bpf-rc[bot] wants to merge 1 commit into
kernel-patches-daemon-bpf-rc[bot] wants to merge 1 commit into
Conversation
Author
|
Upstream branch: 140fa23 |
4d4751c to
dcffd40
Compare
Author
|
Upstream branch: 2e8ad1f |
06eecf6 to
c23cc07
Compare
dcffd40 to
8b7f742
Compare
Author
|
Upstream branch: 30dee2c |
raw_res_spin_unlock_irqrestore() calls raw_res_spin_unlock() and then restores interrupts, this means preemption is enabled when interrupts are still disabled (as part of raw_res_spin_unlock()) so this cannot trigger an actual preemption. This is inconsistent with other spinlock implementations (raw_spin_unlock_irqrestore() and bpf_res_spin_unlock_irqrestore() itself). Adjust the macro to ensure interrupts are enabled before enabling preemption, allowing to schedule at that point. Make the same modification in the error path of raw_res_spin_lock_irqsave(). Fixes: 101acd2 ("rqspinlock: Add macros for rqspinlock usage") Cc: stable@vger.kernel.org Acked-by: Arnd Bergmann <arnd@arndb.de> # asm-generic Acked-by: Waiman Long <longman@redhat.com> Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
c23cc07 to
dfba8a3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for series with
subject: rqspinlock: Fix order in raw_res_spin_(un)lock_irq to allow schedule
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1109134