mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-04 21:57:30 +00:00
RDMA/cm: Abort loop in case of CM dequeue
In case CM work list is empty, the work pointer will be NULL, so instead of kernel crash it is better to abort processing of works. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
cd13a399e6
commit
2f5059a7af
1 changed files with 3 additions and 1 deletions
|
@ -1707,7 +1707,9 @@ static void cm_process_work(struct cm_id_private *cm_id_priv,
|
|||
spin_lock_irq(&cm_id_priv->lock);
|
||||
work = cm_dequeue_work(cm_id_priv);
|
||||
spin_unlock_irq(&cm_id_priv->lock);
|
||||
BUG_ON(!work);
|
||||
if (!work)
|
||||
return;
|
||||
|
||||
ret = cm_id_priv->id.cm_handler(&cm_id_priv->id,
|
||||
&work->cm_event);
|
||||
cm_free_work(work);
|
||||
|
|
Loading…
Add table
Reference in a new issue