mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
IB/ehca: Fix improper use of yield() with spinlock held
Signed-off-by: Hoang-Nam Nguyen <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
This commit is contained in:
parent
a20f3a6d7e
commit
ce29d72cc7
1 changed files with 4 additions and 1 deletions
|
|
@ -344,8 +344,11 @@ int ehca_destroy_cq(struct ib_cq *cq)
|
|||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&ehca_cq_idr_lock, flags);
|
||||
while (my_cq->nr_callbacks)
|
||||
while (my_cq->nr_callbacks) {
|
||||
spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
|
||||
yield();
|
||||
spin_lock_irqsave(&ehca_cq_idr_lock, flags);
|
||||
}
|
||||
|
||||
idr_remove(&ehca_cq_idr, my_cq->token);
|
||||
spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
|
||||
|
|
|
|||
Loading…
Reference in a new issue