]> Gentwo Git Trees - linux/.git/commit
ntb: Add mutex to make link_event_callback executed linearly.
authorfuyuanli <fuyuanli0722@gmail.com>
Mon, 25 Aug 2025 09:15:08 +0000 (17:15 +0800)
committerJon Mason <jdmason@kudzu.us>
Mon, 22 Sep 2025 13:35:21 +0000 (09:35 -0400)
commit3db835dd8f9a78e9709cb48b77d89b41792e9281
tree3e75150efd15507d50781934caf557a3c0001e4d
parenteb4431bf8823cc55be6c705c122980be0690a904
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>
drivers/ntb/ntb_transport.c