From mboxrd@z Thu Jan 1 00:00:00 1970 From: Krishna Gudipati Subject: RE: [PATCH] bfa: squelch lockdep complaint with a spin_lock_init Date: Wed, 11 Jul 2012 11:53:40 -0700 Message-ID: References: <20120711164255.GO2896@redacted.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Return-path: Received: from mx0a-000f0801.pphosted.com ([67.231.144.122]:33073 "EHLO mx0a-000f0801.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932191Ab2GKTRs convert rfc822-to-8bit (ORCPT ); Wed, 11 Jul 2012 15:17:48 -0400 In-Reply-To: <20120711164255.GO2896@redacted.bos.redhat.com> Content-Language: en-US Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: 'Kyle McMartin' , "'linux-scsi@vger.kernel.org'" Cc: "'huangj@brocade.com'" -----Original Message----- From: Kyle McMartin [mailto:kmcmarti@redhat.com] Sent: Wednesday, July 11, 2012 9:43 AM To: linux-scsi@vger.kernel.org Cc: huangj@brocade.com; Krishna Gudipati Subject: [PATCH] bfa: squelch lockdep complaint with a spin_lock_init Spotted this while looking at another issue... INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. Pid: 298, comm: udevd Not tainted 3.3.0 #1 Call Trace: [] __lock_acquire+0x1363/0x1bb0 [] ? __slab_alloc+0x4a0/0x4fd [] ? native_sched_clock+0x13/0x80 [] ? sched_clock+0x9/0x10 [] lock_acquire+0xa1/0x1e0 [] ? bfa_fcs_lport_aen_post+0x43/0x160 [bfa] [] _raw_spin_lock_irqsave+0x65/0xb0 [] ? bfa_fcs_lport_aen_post+0x43/0x160 [bfa] [] bfa_fcs_lport_aen_post+0x43/0x160 [bfa] [] bfa_fcs_lport_init+0x97/0x120 [bfa] [] bfa_fcs_fabric_sm_uninit+0x1cf/0x250 [bfa] [] bfa_fcs_fabric_modinit+0x2a/0xb0 [bfa] [] ? bfa_fcs_fabric_attach+0xf2/0x170 [bfa] [] bfa_fcs_init+0x2a/0x40 [bfa] [] bfad_drv_init+0x107/0x1f0 [bfa] [] bfad_pci_probe+0x277/0x450 [bfa] [] local_pci_probe+0x5c/0xd0 [] pci_device_probe+0x111/0x120 [] driver_probe_device+0x96/0x2f0 [] __driver_attach+0xab/0xb0 [] ? driver_probe_device+0x2f0/0x2f0 [] bus_for_each_dev+0x55/0x90 [] ? 0xffffffffa037afff [] driver_attach+0x1e/0x20 [] bus_add_driver+0x1b8/0x2b0 [] ? 0xffffffffa037afff [] driver_register+0x77/0x160 [] ? 0xffffffffa037afff [] __pci_register_driver+0x73/0xf0 [] ? 0xffffffffa037afff [] bfad_init+0x83/0x1000 [bfa] [] do_one_initcall+0x12a/0x180 [] sys_init_module+0xc0/0x220 [] system_call_fastpath+0x16/0x1b Signed-off-by: Kyle McMartin --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bfa/bfad.c @@ -1383,6 +1383,8 @@ bfad_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid) bfa_sm_set_state(bfad, bfad_sm_uninit); spin_lock_init(&bfad->bfad_lock); + spin_lock_init(&bfad->bfad_aen_spinlock); + pci_set_drvdata(pdev, bfad); bfad->ref_count = 0; ----- Looks good, thanks for the patch Kyle. Acked-by: Krishna Gudipati