Loading
ntb: Add mutex to make link_event_callback executed linearly.
Since the CPU selected by schedule_work is uncertain, multiple link_event callbacks may be executed at same time. For example, after peer's link is up, it is down quickly before local link_work completed. If link_cleanup is added to the workqueue of another CPU, then link_work and link_cleanup may be executed at the same time. So add a mutex to prevent them from being executed concurrently. Signed-off-by:fuyuanli <fuyuanli@didiglobal.com> Reviewed-by:
Logan Gunthorpe <logang@deltatee.com> Reviewed-by:
Dave Jiang <dave.jiang@intel.com> Signed-off-by:
Jon Mason <jdmason@kudzu.us>