>
> <-- snip -->
>
> Are you sure thats safe? The lock is a mutex, and it appears that we get
> called
> from a few contexts which may not be safe to grab a mutex in (from
> cnic_netdev_event for instance:
> cnic_netdev_event
>  cnic_ulp_exit
>   cnic_exit
>    bnx2fc_ulp_exit
>     bnx2fc_if_destroy
>      fc_exch_mgr_free
> 
> I agree that using the lport lock seems like the easy solution and one
> that
> would be free of the race vasu described, but I'd hate to trade in what
> we have
> now for lockdep warnings and potential deadlock.
> Neil
The calling path you have here is already grabbing some mutex, e.g.,
bnx2fc_dev_lock in bnx2fc_ulp_exit, similarly in fcoe_if_destroy that calls
fc_exch_mgr_free(), we grab rtnl_lcok, therefore, I would think we should
be fine, it will be nested...I do agree with you we want to be sure 
about this. I will dig more.

However, the issue is more on what Vasu is asking, is it probably
somehow the corresponding exch/seq is gone in fc_fcp_complete_locked()?

yi

_______________________________________________
devel mailing list
devel@open-fcoe.org
https://lists.open-fcoe.org/mailman/listinfo/devel

Reply via email to