linux-4.7.0: possible irq lock inversion dependency detected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

getting warning bellow on IGEPv2. Anyone seen it as well before digging
into it?

Thanks,
	ladis

=========================================================
[ INFO: possible irq lock inversion dependency detected ]
4.7.0 #1 Not tainted
---------------------------------------------------------
irq/72-48070000/43 just changed the state of lock:
 (&(&musb->lock)->rlock){-.....}, at: [<c041ab3c>] omap2430_musb_interrupt+0x10/0xa0
but this lock took another, HARDIRQ-unsafe lock in the past:
 (&phy->mutex){+.+...}

and interrupts could create inverse lock ordering between them.


other info that might help us debug this:
 Possible interrupt unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&phy->mutex);
                               local_irq_disable();
                               lock(&(&musb->lock)->rlock);
                               lock(&phy->mutex);
  <Interrupt>
    lock(&(&musb->lock)->rlock);

 *** DEADLOCK ***

no locks held by irq/72-48070000/43.

the shortest dependencies between 2nd lock and 1st lock:
 -> (&phy->mutex){+.+...} ops: 3 {
    HARDIRQ-ON-W at:
                      [<c05b3dbc>] mutex_lock_nested+0x3c/0x30c
                      [<c033bcdc>] phy_init+0x34/0x9c
                      [<c041aa18>] omap2430_musb_init+0xbc/0x1d0
                      [<c0413268>] musb_probe+0x1b4/0x844
                      [<c0387250>] platform_drv_probe+0x50/0xa0
                      [<c0385a0c>] driver_probe_device+0x1cc/0x40c
                      [<c0383de8>] bus_for_each_drv+0x84/0x94
                      [<c0385748>] __device_attach+0x8c/0x12c
                      [<c0384c04>] bus_probe_device+0x28/0x84
                      [<c0385170>] deferred_probe_work_func+0x74/0xa8
                      [<c013e324>] process_one_work+0x224/0x3c8
                      [<c013ea64>] worker_thread+0x2ac/0x3d4
                      [<c0142cf4>] kthread+0xd0/0xe4
                      [<c0107570>] ret_from_fork+0x14/0x24
    SOFTIRQ-ON-W at:
                      [<c05b3dbc>] mutex_lock_nested+0x3c/0x30c
                      [<c033bcdc>] phy_init+0x34/0x9c
                      [<c041aa18>] omap2430_musb_init+0xbc/0x1d0
                      [<c0413268>] musb_probe+0x1b4/0x844
                      [<c0387250>] platform_drv_probe+0x50/0xa0
                      [<c0385a0c>] driver_probe_device+0x1cc/0x40c
                      [<c0383de8>] bus_for_each_drv+0x84/0x94
                      [<c0385748>] __device_attach+0x8c/0x12c
                      [<c0384c04>] bus_probe_device+0x28/0x84
                      [<c0385170>] deferred_probe_work_func+0x74/0xa8
                      [<c013e324>] process_one_work+0x224/0x3c8
                      [<c013ea64>] worker_thread+0x2ac/0x3d4
                      [<c0142cf4>] kthread+0xd0/0xe4
                      [<c0107570>] ret_from_fork+0x14/0x24
    INITIAL USE at:
                     [<c05b3dbc>] mutex_lock_nested+0x3c/0x30c
                     [<c033bcdc>] phy_init+0x34/0x9c
                     [<c041aa18>] omap2430_musb_init+0xbc/0x1d0
                     [<c0413268>] musb_probe+0x1b4/0x844
                     [<c0387250>] platform_drv_probe+0x50/0xa0
                     [<c0385a0c>] driver_probe_device+0x1cc/0x40c
                     [<c0383de8>] bus_for_each_drv+0x84/0x94
                     [<c0385748>] __device_attach+0x8c/0x12c
                     [<c0384c04>] bus_probe_device+0x28/0x84
                     [<c0385170>] deferred_probe_work_func+0x74/0xa8
                     [<c013e324>] process_one_work+0x224/0x3c8
                     [<c013ea64>] worker_thread+0x2ac/0x3d4
                     [<c0142cf4>] kthread+0xd0/0xe4
                     [<c0107570>] ret_from_fork+0x14/0x24
  }
  ... key      at: [<c11f87b0>] __key.25212+0x0/0x8
  ... acquired at:
   [<c033b3a0>] phy_power_on+0x58/0xe0
   [<c041a8dc>] omap2430_musb_enable+0xf8/0x110
   [<c0413bd4>] musb_start+0x104/0x128
   [<c04152c4>] musb_hub_control+0x234/0x434
   [<c03f09a0>] usb_hcd_submit_urb+0x5cc/0x844
   [<c03f225c>] usb_start_wait_urb+0x44/0x12c
   [<c03f23e0>] usb_control_msg+0x9c/0xc4
   [<c03e6f48>] set_port_feature+0x40/0x48
   [<c03ea23c>] hub_power_on+0xa4/0xf8
   [<c03ea3ec>] hub_activate+0x15c/0x644
   [<c03ed8c4>] hub_probe+0x49c/0xcf0
   [<c03f5f60>] usb_probe_interface+0x1ac/0x258
   [<c0385a0c>] driver_probe_device+0x1cc/0x40c
   [<c0383de8>] bus_for_each_drv+0x84/0x94
   [<c0385748>] __device_attach+0x8c/0x12c
   [<c0384c04>] bus_probe_device+0x28/0x84
   [<c03830f8>] device_add+0x414/0x53c
   [<c03f43ec>] usb_set_configuration+0x65c/0x6fc
   [<c03fd8a4>] generic_probe+0x3c/0x74
   [<c0385a0c>] driver_probe_device+0x1cc/0x40c
   [<c0383de8>] bus_for_each_drv+0x84/0x94
   [<c0385748>] __device_attach+0x8c/0x12c
   [<c0384c04>] bus_probe_device+0x28/0x84
   [<c03830f8>] device_add+0x414/0x53c
   [<c03eb300>] usb_new_device+0x2c0/0x408
   [<c03ef838>] usb_add_hcd+0x5ec/0x8dc
   [<c0419248>] musb_host_setup+0x90/0xac
   [<c04136c4>] musb_probe+0x610/0x844
   [<c0387250>] platform_drv_probe+0x50/0xa0
   [<c0385a0c>] driver_probe_device+0x1cc/0x40c
   [<c0383de8>] bus_for_each_drv+0x84/0x94
   [<c0385748>] __device_attach+0x8c/0x12c
   [<c0384c04>] bus_probe_device+0x28/0x84
   [<c0385170>] deferred_probe_work_func+0x74/0xa8
   [<c013e324>] process_one_work+0x224/0x3c8
   [<c013ea64>] worker_thread+0x2ac/0x3d4
   [<c0142cf4>] kthread+0xd0/0xe4
   [<c0107570>] ret_from_fork+0x14/0x24

-> (&(&musb->lock)->rlock){-.....} ops: 5 {
   IN-HARDIRQ-W at:
                    [<c05b632c>] _raw_spin_lock_irqsave+0x38/0x4c
                    [<c041ab3c>] omap2430_musb_interrupt+0x10/0xa0
                    [<c015b740>] handle_irq_event_percpu+0x34/0x134
                    [<c015b878>] handle_irq_event+0x38/0x5c
                    [<c015e1b4>] handle_level_irq+0xcc/0x108
                    [<c015af80>] generic_handle_irq+0x18/0x28
                    [<c015b228>] __handle_domain_irq+0x80/0xa0
                    [<c010bb78>] __irq_svc+0x58/0x78
                    [<c05b64a0>] _raw_spin_unlock_irq+0x28/0x2c
                    [<c015c32c>] irq_finalize_oneshot+0xcc/0xec
                    [<c015c378>] irq_thread_fn+0x2c/0x34
                    [<c015c578>] irq_thread+0xbc/0x198
                    [<c0142cf4>] kthread+0xd0/0xe4
                    [<c0107570>] ret_from_fork+0x14/0x24
   INITIAL USE at:
                   [<c05b632c>] _raw_spin_lock_irqsave+0x38/0x4c
                   [<c04150b4>] musb_hub_control+0x24/0x434
                   [<c03f09a0>] usb_hcd_submit_urb+0x5cc/0x844
                   [<c03f225c>] usb_start_wait_urb+0x44/0x12c
                   [<c03f23e0>] usb_control_msg+0x9c/0xc4
                   [<c03ed750>] hub_probe+0x328/0xcf0
                   [<c03f5f60>] usb_probe_interface+0x1ac/0x258
                   [<c0385a0c>] driver_probe_device+0x1cc/0x40c
                   [<c0383de8>] bus_for_each_drv+0x84/0x94
                   [<c0385748>] __device_attach+0x8c/0x12c
                   [<c0384c04>] bus_probe_device+0x28/0x84
                   [<c03830f8>] device_add+0x414/0x53c
                   [<c03f43ec>] usb_set_configuration+0x65c/0x6fc
                   [<c03fd8a4>] generic_probe+0x3c/0x74
                   [<c0385a0c>] driver_probe_device+0x1cc/0x40c
                   [<c0383de8>] bus_for_each_drv+0x84/0x94
                   [<c0385748>] __device_attach+0x8c/0x12c
                   [<c0384c04>] bus_probe_device+0x28/0x84
                   [<c03830f8>] device_add+0x414/0x53c
                   [<c03eb300>] usb_new_device+0x2c0/0x408
                   [<c03ef838>] usb_add_hcd+0x5ec/0x8dc
                   [<c0419248>] musb_host_setup+0x90/0xac
                   [<c04136c4>] musb_probe+0x610/0x844
                   [<c0387250>] platform_drv_probe+0x50/0xa0
                   [<c0385a0c>] driver_probe_device+0x1cc/0x40c
                   [<c0383de8>] bus_for_each_drv+0x84/0x94
                   [<c0385748>] __device_attach+0x8c/0x12c
                   [<c0384c04>] bus_probe_device+0x28/0x84
                   [<c0385170>] deferred_probe_work_func+0x74/0xa8
                   [<c013e324>] process_one_work+0x224/0x3c8
                   [<c013ea64>] worker_thread+0x2ac/0x3d4
                   [<c0142cf4>] kthread+0xd0/0xe4
                   [<c0107570>] ret_from_fork+0x14/0x24
 }
 ... key      at: [<c11fa194>] __key.33567+0x0/0x8
 ... acquired at:
   [<c01530b8>] __lock_acquire+0x340/0x17cc
   [<c01548e0>] lock_acquire+0x70/0x90
   [<c05b632c>] _raw_spin_lock_irqsave+0x38/0x4c
   [<c041ab3c>] omap2430_musb_interrupt+0x10/0xa0
   [<c015b740>] handle_irq_event_percpu+0x34/0x134
   [<c015b878>] handle_irq_event+0x38/0x5c
   [<c015e1b4>] handle_level_irq+0xcc/0x108
   [<c015af80>] generic_handle_irq+0x18/0x28
   [<c015b228>] __handle_domain_irq+0x80/0xa0
   [<c010bb78>] __irq_svc+0x58/0x78
   [<c05b64a0>] _raw_spin_unlock_irq+0x28/0x2c
   [<c015c32c>] irq_finalize_oneshot+0xcc/0xec
   [<c015c378>] irq_thread_fn+0x2c/0x34
   [<c015c578>] irq_thread+0xbc/0x198
   [<c0142cf4>] kthread+0xd0/0xe4
   [<c0107570>] ret_from_fork+0x14/0x24


stack backtrace:
CPU: 0 PID: 43 Comm: irq/72-48070000 Not tainted 4.7.0 #1
Hardware name: Generic OMAP36xx (Flattened Device Tree)
[<c010d2f4>] (unwind_backtrace) from [<c010b140>] (show_stack+0x10/0x14)
[<c010b140>] (show_stack) from [<c0196114>] (print_irq_inversion_bug.part.9+0x170/0x1a8)
[<c0196114>] (print_irq_inversion_bug.part.9) from [<c0151b08>] (check_usage_forwards+0x10c/0x140)
[<c0151b08>] (check_usage_forwards) from [<c0152634>] (mark_lock+0x36c/0x618)
[<c0152634>] (mark_lock) from [<c01530b8>] (__lock_acquire+0x340/0x17cc)
[<c01530b8>] (__lock_acquire) from [<c01548e0>] (lock_acquire+0x70/0x90)
[<c01548e0>] (lock_acquire) from [<c05b632c>] (_raw_spin_lock_irqsave+0x38/0x4c)
[<c05b632c>] (_raw_spin_lock_irqsave) from [<c041ab3c>] (omap2430_musb_interrupt+0x10/0xa0)
[<c041ab3c>] (omap2430_musb_interrupt) from [<c015b740>] (handle_irq_event_percpu+0x34/0x134)
[<c015b740>] (handle_irq_event_percpu) from [<c015b878>] (handle_irq_event+0x38/0x5c)
[<c015b878>] (handle_irq_event) from [<c015e1b4>] (handle_level_irq+0xcc/0x108)
[<c015e1b4>] (handle_level_irq) from [<c015af80>] (generic_handle_irq+0x18/0x28)
[<c015af80>] (generic_handle_irq) from [<c015b228>] (__handle_domain_irq+0x80/0xa0)
[<c015b228>] (__handle_domain_irq) from [<c010bb78>] (__irq_svc+0x58/0x78)
[<c010bb78>] (__irq_svc) from [<c05b64a0>] (_raw_spin_unlock_irq+0x28/0x2c)
[<c05b64a0>] (_raw_spin_unlock_irq) from [<c015c32c>] (irq_finalize_oneshot+0xcc/0xec)
[<c015c32c>] (irq_finalize_oneshot) from [<c015c378>] (irq_thread_fn+0x2c/0x34)
[<c015c378>] (irq_thread_fn) from [<c015c578>] (irq_thread+0xbc/0x198)
[<c015c578>] (irq_thread) from [<c0142cf4>] (kthread+0xd0/0xe4)
[<c0142cf4>] (kthread) from [<c0107570>] (ret_from_fork+0x14/0x24)

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux