Skip to content

Commit 0d73122

Browse files
Matthew R. OchsJames Bottomley
authored andcommitted
cxlflash: Fix to avoid lock instrumentation rejection
When running with lock instrumentation (e.g. lockdep), some of the instrumentation can become disabled at probe time for a cxlflash adapter. This is due to a missing lock registration for the tmf_slock. The fix is to call spin_lock_init() for the tmf_slock during probe. Signed-off-by: Matthew R. Ochs <[email protected]> Acked-by: Manoj Kumar <[email protected]> Reviewed-by: Andrew Donnellan <[email protected]> Signed-off-by: James Bottomley <[email protected]>
1 parent 1a47401 commit 0d73122

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/scsi/cxlflash/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2410,6 +2410,7 @@ static int cxlflash_probe(struct pci_dev *pdev,
24102410
INIT_WORK(&cfg->work_q, cxlflash_worker_thread);
24112411
cfg->lr_state = LINK_RESET_INVALID;
24122412
cfg->lr_port = -1;
2413+
spin_lock_init(&cfg->tmf_slock);
24132414
mutex_init(&cfg->ctx_tbl_list_mutex);
24142415
mutex_init(&cfg->ctx_recovery_mutex);
24152416
init_rwsem(&cfg->ioctl_rwsem);

0 commit comments

Comments
 (0)