mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-15 23:41:35 -04:00
ntb: transport: Fix uninitialized mutex
When the mutex 'link_event_lock' was introduced, it was never
initialized and it triggers kernel warnings when used with locking
debug turned on. Add initialization for the mutex.
Fixes: 3db835dd8f ("ntb: Add mutex to make link_event_callback executed linearly.")
Cc: fuyuanli <fuyuanli0722@gmail.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
This commit is contained in:
@@ -1394,6 +1394,7 @@ static int ntb_transport_probe(struct ntb_client *self, struct ntb_dev *ndev)
|
||||
goto err2;
|
||||
}
|
||||
|
||||
mutex_init(&nt->link_event_lock);
|
||||
INIT_DELAYED_WORK(&nt->link_work, ntb_transport_link_work);
|
||||
INIT_WORK(&nt->link_cleanup, ntb_transport_link_cleanup_work);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user