From: Matthew R. Ochs Date: Wed, 21 Oct 2015 20:16:24 +0000 (-0500) Subject: cxlflash: Fix to avoid lock instrumentation rejection X-Git-Tag: v4.14-rc1~4307^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d73122c3229a332286f3a256ba098d124aba066;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Manoj Kumar Reviewed-by: Andrew Donnellan Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index afaf533..1e5bf0c 100644 --- a/drivers/scsi/cxlflash/main.c +++ b/drivers/scsi/cxlflash/main.c @@ -2410,6 +2410,7 @@ static int cxlflash_probe(struct pci_dev *pdev, INIT_WORK(&cfg->work_q, cxlflash_worker_thread); cfg->lr_state = LINK_RESET_INVALID; cfg->lr_port = -1; + spin_lock_init(&cfg->tmf_slock); mutex_init(&cfg->ctx_tbl_list_mutex); mutex_init(&cfg->ctx_recovery_mutex); init_rwsem(&cfg->ioctl_rwsem);