android_kernel_xiaomi_sm8350/drivers/infiniband/hw/mthca
Zach Brown a46f9484f8 [PATCH] mthca: initialize send and receive queue locks separately
mthca: initialize send and receive queue locks separately

lockdep identifies a lock by the call site of its initialization.  By
initializing the send and receive queue locks in mthca_wq_init() we confuse
lockdep.  It warns that that the ordered acquiry of both locks in
mthca_modify_qp() is recursive acquiry of one lock:

  =============================================
  [ INFO: possible recursive locking detected ]
  ---------------------------------------------
  modprobe/1192 is trying to acquire lock:
   (&wq->lock){....}, at: [<f892b4db>] mthca_modify_qp+0x60/0xa7b [ib_mthca]
  but task is already holding lock:
   (&wq->lock){....}, at: [<f892b4ce>] mthca_modify_qp+0x53/0xa7b [ib_mthca]

Initializing the locks separately in mthca_alloc_qp_common() stops the
warning and will let lockdep enforce proper ordering on paths that acquire
both locks.

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-04 10:24:57 -07:00
..
Kconfig
Makefile
mthca_allocator.c
mthca_av.c IB: simplify static rate encoding 2006-04-10 09:43:47 -07:00
mthca_catas.c
mthca_cmd.c IB/mthca: Convert FW commands to use wait_for_completion_timeout() 2006-06-17 20:37:30 -07:00
mthca_cmd.h IB: simplify static rate encoding 2006-04-10 09:43:47 -07:00
mthca_config_reg.h
mthca_cq.c IB/mthca: Make all device methods truly reentrant 2006-06-17 20:37:41 -07:00
mthca_dev.h IB/mthca: Fix race in reference counting 2006-05-09 10:50:29 -07:00
mthca_doorbell.h
mthca_eq.c [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
mthca_mad.c IB/mthca: Add client reregister event generation 2006-06-17 20:37:36 -07:00
mthca_main.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mthca_mcg.c
mthca_memfree.c
mthca_memfree.h
mthca_mr.c IB/mthca: FMR ioremap fix 2006-05-10 15:16:57 -07:00
mthca_pd.c
mthca_profile.c
mthca_profile.h
mthca_provider.c IB/mthca: Make all device methods truly reentrant 2006-06-17 20:37:41 -07:00
mthca_provider.h IB/mthca: Make all device methods truly reentrant 2006-06-17 20:37:41 -07:00
mthca_qp.c [PATCH] mthca: initialize send and receive queue locks separately 2006-07-04 10:24:57 -07:00
mthca_reset.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mthca_srq.c IB/mthca: Make all device methods truly reentrant 2006-06-17 20:37:41 -07:00
mthca_uar.c
mthca_user.h
mthca_wqe.h