diff mbox

[v6,36/37] cxlflash: Fix to avoid lock instrumentation rejection

Message ID 1445458584-63347-1-git-send-email-mrochs@linux.vnet.ibm.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Matthew R. Ochs Oct. 21, 2015, 8:16 p.m. UTC
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 <mrochs@linux.vnet.ibm.com>
---
 drivers/scsi/cxlflash/main.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Manoj Kumar Oct. 22, 2015, 5:34 p.m. UTC | #1
Acked-by: Manoj Kumar <manoj@linux.vnet.ibm.com>

On 10/21/2015 3:16 PM, Matthew R. Ochs wrote:
> 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.
Andrew Donnellan Oct. 23, 2015, 3:22 a.m. UTC | #2
On 22/10/15 07:16, Matthew R. Ochs wrote:
> 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 <mrochs@linux.vnet.ibm.com>

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
diff mbox

Patch

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);