linux/drivers/infiniband/hw/qib
Mike Marciniszyn f3bdf34465 IB/qib: Fix lockdep splat in qib_alloc_lkey()
The following backtrace is reported with CONFIG_PROVE_RCU:

    drivers/infiniband/hw/qib/qib_keys.c:64 suspicious rcu_dereference_check() usage!
    other info that might help us debug this:
    rcu_scheduler_active = 1, debug_locks = 1
    4 locks held by kworker/0:1/56:
    #0:  (events){.+.+.+}, at: [<ffffffff8107a4f5>] process_one_work+0x165/0x4a0
    #1:  ((&wfc.work)){+.+.+.}, at: [<ffffffff8107a4f5>] process_one_work+0x165/0x4a0
    #2:  (device_mutex){+.+.+.}, at: [<ffffffffa0148dd8>] ib_register_device+0x38/0x220 [ib_core]
    #3:  (&(&dev->lk_table.lock)->rlock){......}, at: [<ffffffffa017e81c>] qib_alloc_lkey+0x3c/0x1b0 [ib_qib]

    stack backtrace:
    Pid: 56, comm: kworker/0:1 Not tainted 3.10.0-rc1+ #6
    Call Trace:
    [<ffffffff810c0b85>] lockdep_rcu_suspicious+0xe5/0x130
    [<ffffffffa017e8e1>] qib_alloc_lkey+0x101/0x1b0 [ib_qib]
    [<ffffffffa0184886>] qib_get_dma_mr+0xa6/0xd0 [ib_qib]
    [<ffffffffa01461aa>] ib_get_dma_mr+0x1a/0x50 [ib_core]
    [<ffffffffa01678dc>] ib_mad_port_open+0x12c/0x390 [ib_mad]
    [<ffffffff810c2c55>] ?  trace_hardirqs_on_caller+0x105/0x190
    [<ffffffffa0167b92>] ib_mad_init_device+0x52/0x110 [ib_mad]
    [<ffffffffa01917c0>] ?  sl2vl_attr_show+0x30/0x30 [ib_qib]
    [<ffffffffa0148f49>] ib_register_device+0x1a9/0x220 [ib_core]
    [<ffffffffa01b1685>] qib_register_ib_device+0x735/0xa40 [ib_qib]
    [<ffffffff8106ba98>] ? mod_timer+0x118/0x220
    [<ffffffffa017d425>] qib_init_one+0x1e5/0x400 [ib_qib]
    [<ffffffff812ce86e>] local_pci_probe+0x4e/0x90
    [<ffffffff81078118>] work_for_cpu_fn+0x18/0x30
    [<ffffffff8107a566>] process_one_work+0x1d6/0x4a0
    [<ffffffff8107a4f5>] ?  process_one_work+0x165/0x4a0
    [<ffffffff8107c9c9>] worker_thread+0x119/0x370
    [<ffffffff8107c8b0>] ?  manage_workers+0x180/0x180
    [<ffffffff8108294e>] kthread+0xee/0x100
    [<ffffffff81082860>] ?  __init_kthread_worker+0x70/0x70
    [<ffffffff815c04ac>] ret_from_fork+0x7c/0xb0
    [<ffffffff81082860>] ?  __init_kthread_worker+0x70/0x70

Per Documentation/RCU/lockdep-splat.txt, the code now uses rcu_access_pointer()
vs. rcu_dereference().

Reported-by: Jay Fenlason <fenlason@redhat.com>
Reviewed-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2013-06-04 17:05:20 -07:00
..
Kconfig IB/qib: change QLogic to Intel 2013-03-22 18:07:04 -07:00
Makefile IB/qib: Use request_firmware() to load SD7220 firmware 2010-07-08 13:27:05 -07:00
qib_6120_regs.h
qib_7220_regs.h
qib_7220.h IB/qib: Eliminate 64-bit jiffies use 2012-01-03 20:52:12 -08:00
qib_7322_regs.h IB/qib: Mask hardware error during link reset 2010-07-06 14:13:20 -07:00
qib_common.h IB/qib: Add a qib driver version 2012-09-30 20:36:29 -07:00
qib_cq.c IB/qib: Generate completion callback on errors 2011-01-10 17:42:19 -08:00
qib_diag.c IB/qib: checkpatch fixes 2012-07-19 11:20:04 -07:00
qib_dma.c
qib_driver.c IB/qib: change QLogic to Intel 2013-03-22 18:07:04 -07:00
qib_eeprom.c IB/qib: checkpatch fixes 2012-07-19 11:20:04 -07:00
qib_file_ops.c aio: don't include aio.h in sched.h 2013-05-07 20:16:25 -07:00
qib_fs.c fs: Limit sys_mount to only request filesystem modules. 2013-03-03 19:36:31 -08:00
qib_iba6120.c IB/qib: change QLogic to Intel 2013-03-22 18:07:04 -07:00
qib_iba7220.c IB/qib: checkpatch fixes 2012-07-19 11:20:04 -07:00
qib_iba7322.c IB/qib: Fix error return code in qib_init_7322_variables() 2012-08-15 11:58:21 -07:00
qib_init.c IB/qib: change QLogic to Intel 2013-03-22 18:07:04 -07:00
qib_intr.c IB/qib: checkpatch fixes 2012-07-19 11:20:04 -07:00
qib_keys.c IB/qib: Fix lockdep splat in qib_alloc_lkey() 2013-06-04 17:05:20 -07:00
qib_mad.c IB/qib: Fix failure of compliance test C14-024#06_LocalPortNum 2012-09-14 10:42:32 -07:00
qib_mad.h IB/qib: Add congestion control agent implementation 2012-07-19 11:20:04 -07:00
qib_mmap.c
qib_mr.c IB/qib: RCU locking for MR validation 2012-07-08 18:05:19 -07:00
qib_pcie.c Merge branch 'pci/stephen-const' into next 2012-09-12 13:54:10 -06:00
qib_pio_copy.c
qib_qp.c IB/qib: Fix QP locate/remove race 2013-02-14 17:04:18 -08:00
qib_qsfp.c IB/qib: Fix over-scheduling of QSFP work 2011-11-28 12:17:33 -08:00
qib_qsfp.h IB/qib: Eliminate 64-bit jiffies use 2012-01-03 20:52:12 -08:00
qib_rc.c IB/qib: Avoid returning EBUSY from MR deregister 2012-07-08 18:05:19 -07:00
qib_ruc.c IB/qib: Avoid returning EBUSY from MR deregister 2012-07-08 18:05:19 -07:00
qib_sd7220.c firmware,IB/qib: revert firmware file move 2013-04-05 12:19:39 -07:00
qib_sdma.c IB/qib: checkpatch fixes 2012-07-19 11:20:04 -07:00
qib_srq.c RDMA/core: Add SRQ type field 2011-10-13 09:13:26 -07:00
qib_sysfs.c IB/qib: Correct qib_verbs_register_sysfs() error handling 2013-04-16 23:04:36 -07:00
qib_twsi.c IB/qib: checkpatch fixes 2012-07-19 11:20:04 -07:00
qib_tx.c IB/qib: Optimize pio ack buffer allocation 2012-05-14 12:37:03 -07:00
qib_uc.c IB/qib: Avoid returning EBUSY from MR deregister 2012-07-08 18:05:19 -07:00
qib_ud.c IB/qib: Avoid returning EBUSY from MR deregister 2012-07-08 18:05:19 -07:00
qib_user_pages.c mm: distinguish between mlocked and pinned pages 2011-10-31 17:30:46 -07:00
qib_user_sdma.c Fix common misspellings 2011-03-31 11:26:23 -03:00
qib_user_sdma.h
qib_verbs_mcast.c
qib_verbs.c IB/qib: Correct qib_verbs_register_sysfs() error handling 2013-04-16 23:04:36 -07:00
qib_verbs.h IB/qib: Reduce sdma_lock contention 2012-07-19 11:19:58 -07:00
qib_wc_ppc64.c
qib_wc_x86_64.c IB/qib: checkpatch fixes 2012-07-19 11:20:04 -07:00
qib.h make drivers with pci error handlers const 2012-09-07 16:35:00 -06:00