Re: [PATCH 1/1] iser-target: Fix handling of RDMA_CV_EVENT_ADDR_CHANGE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 18, 2021 at 06:24:26PM +0000, Chesnokov Gleb wrote:
> Hi Leon,

Please don't use top-posting format. Thanks

> 
> 
> isert_cma_handler() is called from cma_work_handler(), which holds id_priv->handler_mutex.
> The call of rdma_destroy_id() from isert_cma_handler() will cause recursive acquisition of the mutex, leading to a deadlock.
> 
> -- cma_work_handler()
> ---- mutex_lock(&id_priv->handler_mutex)
> ---- isert_cma_handler()
> ------ rmda_destroy_id()
> -------- mutex_lock(&id_priv->handler_mutex)

This answers why you needed workqueue.

> 
> Therefore, you cannot directly call isert_np_reinit_id().

I would expect rdma-cm to be changed to support such flow.
However it is probably overkill.

Thanks,
Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux