rqspinlock: Fix order in raw_res_spin_(un)lock_irq to allow schedule#12427
rqspinlock: Fix order in raw_res_spin_(un)lock_irq to allow schedule#12427kernel-patches-daemon-bpf[bot] wants to merge 1 commit into
Conversation
|
Upstream branch: 140fa23 |
AI reviewed your patch. Please fix the bug or email reply why it's not a bug. In-Reply-To-Subject: |
|
Forwarding comment 4668657195 via email |
818f7b1 to
d9ed865
Compare
|
Upstream branch: 2e8ad1f |
1 similar comment
|
Upstream branch: 2e8ad1f |
3877437 to
08b0ba8
Compare
d9ed865 to
1b36123
Compare
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>
|
Upstream branch: 30dee2c |
08b0ba8 to
56cdc9c
Compare
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