android_kernel_xiaomi_sm8350/drivers/infiniband/hw/ipath
Roland Dreier 8b8c8bca3a IB/ipath: Fix potential deadlock with multicast spinlocks
Lockdep found the following potential deadlock between mcast_lock and
n_mcast_grps_lock: mcast_lock is taken from both interrupt context and
process context, so spin_lock_irqsave() must be used to take it.
n_mcast_grps_lock is only taken from process context, so at first it
seems safe to take it with plain spin_lock(); however, it also nests
inside mcast_lock, and hence we could deadlock:

  cpu A                                   cpu B
    ipath_mcast_add():
      spin_lock_irq(&mcast_lock);

                                            ipath_mcast_detach():
                                              spin_lock(&n_mcast_grps_lock);

                                            <enter interrupt>

                                            ipath_mcast_find():
                                              spin_lock_irqsave(&mcast_lock);

      spin_lock(&n_mcast_grps_lock);

Fix this by using spin_lock_irq() to take n_mcast_grps_lock.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:53 -07:00
..
ipath_common.h
ipath_cq.c IB: Return "maybe missed event" hint from ib_req_notify_cq() 2007-05-06 21:18:11 -07:00
ipath_debug.h
ipath_diag.c
ipath_dma.c
ipath_driver.c
ipath_eeprom.c
ipath_file_ops.c
ipath_fs.c inode numbering: change libfs sb creation routines to avoid collisions with their root inodes 2007-05-08 11:15:16 -07:00
ipath_iba6110.c
ipath_iba6120.c IB/ipath: Shadow the gpio_mask register 2007-05-14 13:22:42 -07:00
ipath_init_chip.c
ipath_intr.c IB/ipath: Shadow the gpio_mask register 2007-05-14 13:22:42 -07:00
ipath_kernel.h IB/ipath: Shadow the gpio_mask register 2007-05-14 13:22:42 -07:00
ipath_keys.c
ipath_layer.c
ipath_layer.h
ipath_mad.c
ipath_mmap.c
ipath_mr.c IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
ipath_qp.c
ipath_rc.c
ipath_registers.h
ipath_ruc.c
ipath_srq.c
ipath_stats.c
ipath_sysfs.c
ipath_uc.c
ipath_ud.c
ipath_user_pages.c
ipath_verbs_mcast.c IB/ipath: Fix potential deadlock with multicast spinlocks 2007-05-19 08:51:53 -07:00
ipath_verbs.c IB/ipath: Shadow the gpio_mask register 2007-05-14 13:22:42 -07:00
ipath_verbs.h IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
ipath_wc_ppc64.c
ipath_wc_x86_64.c
Kconfig
Makefile