Bug 31782

Summary: nouveau: lockdep spew
Product: Drivers Reporter: Johannes Berg (johannes)
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: CLOSED CODE_FIX    
Severity: normal CC: akpm, dev, florian, maciej.rutecki, rjw, tim
Priority: P1    
Hardware: All   
OS: Linux   
URL: http://johannes.sipsolutions.net/files/nouveau-lockdep.txt
Kernel Version: 2.6.38 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 27352    
Attachments: slight lock reordering from Ben
fix in nouveau tree

Description Johannes Berg 2011-03-24 09:51:40 UTC
[   17.225800] =========================================================
[   17.225805] [ INFO: possible irq lock inversion dependency detected ]
[   17.225808] 2.6.38-wl-65107-gc5f1016-dirty #211
[   17.225810] ---------------------------------------------------------
[   17.225813] modprobe/2506 just changed the state of lock:
[   17.225816]  (&(&dev_priv->context_switch_lock)->rlock){-.....}, at: [<ffffffffa07e93bf>] nouveau_irq_handler+0x5f/0x130 [nouveau]
[   17.225842] but this lock took another, HARDIRQ-unsafe lock in the past:
[   17.225844]  (&(&dev_priv->ramin_lock)->rlock){+.+...}
[   17.225847] 
[   17.225848] and interrupts could create inverse lock ordering between them.
[   17.225849] 
[   17.225851] 
[   17.225852] other info that might help us debug this:
[   17.225855] 5 locks held by modprobe/2506:
[   17.225857]  #0:  (&__lockdep_no_validate__){+.+.+.}, at: [<ffffffff8132f30b>] __driver_attach+0x5b/0xb0
[   17.225869]  #1:  (&__lockdep_no_validate__){+.+.+.}, at: [<ffffffff8132f319>] __driver_attach+0x69/0xb0
[   17.225877]  #2:  (drm_global_mutex){+.+.+.}, at: [<ffffffffa0759202>] drm_get_pci_dev+0x102/0x2c0 [drm]
[   17.225896]  #3:  (&chan->mutex){+.+.+.}, at: [<ffffffffa07e55d4>] nouveau_channel_alloc+0xc4/0x470 [nouveau]
[   17.225915]  #4:  (&sb->s_type->i_mutex_key#2){+.+.+.}, at: [<ffffffff8122e367>] debugfs_create_by_name+0x57/0x1d0
[   17.225926] 
[   17.225927] the shortest dependencies between 2nd lock and 1st lock:
[   17.225953]  -> (&(&dev_priv->ramin_lock)->rlock){+.+...} ops: 24860 {
[   17.225960]     HARDIRQ-ON-W at:
[   17.225963]                                          [<ffffffff81084fab>] mark_irqflags+0x13b/0x1c0
[   17.225970]                                          [<ffffffff8108716c>] __lock_acquire+0x5ac/0xa80
[   17.225975]                                          [<ffffffff81087d4e>] lock_acquire+0x9e/0x1d0
[   17.225980]                                          [<ffffffff8149bdf0>] _raw_spin_lock+0x40/0x80
[   17.225986]                                          [<ffffffffa07e82c1>] nouveau_gpuobj_new+0xb1/0x2d0 [nouveau]
[   17.226002]                                          [<ffffffffa0844cec>] nv50_instmem_init+0x13c/0x530 [nouveau]
[   17.226024]                                          [<ffffffffa07e41db>] nouveau_card_init+0x12b/0x3d0 [nouveau]
[   17.226039]                                          [<ffffffffa07e47c9>] nouveau_load+0x329/0x550 [nouveau]
[   17.226055]                                          [<ffffffffa0759290>] drm_get_pci_dev+0x190/0x2c0 [drm]
[   17.226066]                                          [<ffffffffa0861e79>] nouveau_pci_probe+0x15/0x17 [nouveau]
[   17.226084]                                          [<ffffffff81296cdf>] local_pci_probe+0x5f/0xd0
[   17.226090]                                          [<ffffffff81297458>] pci_device_probe+0x88/0xb0
[   17.226095]                                          [<ffffffff8132ef78>] really_probe+0x68/0x190
[   17.226100]                                          [<ffffffff8132f285>] driver_probe_device+0x45/0x70
[   17.226105]                                          [<ffffffff8132f35b>] __driver_attach+0xab/0xb0
[   17.226110]                                          [<ffffffff8132e096>] bus_for_each_dev+0x66/0x90
[   17.226115]                                          [<ffffffff8132edce>] driver_attach+0x1e/0x20
[   17.226120]                                          [<ffffffff8132e998>] bus_add_driver+0x158/0x290
[   17.226125]                                          [<ffffffff8132f614>] driver_register+0x74/0x130
[   17.226130]                                          [<ffffffff812976d6>] __pci_register_driver+0x66/0xe0
[   17.226135]                                          [<ffffffffa075977f>] drm_pci_init+0xdf/0xf0 [drm]
[   17.226146]                                          [<ffffffffa0750748>] drm_init+0x58/0x70 [drm]
[   17.226155]                                          [<ffffffffa0887048>] nouveau_init+0x48/0x4a [nouveau]
[   17.226169]                                          [<ffffffff810002e4>] do_one_initcall+0x44/0x180
[   17.226175]                                          [<ffffffff8109693a>] sys_init_module+0xca/0x210
[   17.226181]                                          [<ffffffff8100268b>] system_call_fastpath+0x16/0x1b
[   17.226186]     SOFTIRQ-ON-W at:
[   17.226189]                                          [<ffffffff81084fcf>] mark_irqflags+0x15f/0x1c0
[   17.226194]                                          [<ffffffff8108716c>] __lock_acquire+0x5ac/0xa80
[   17.226199]                                          [<ffffffff81087d4e>] lock_acquire+0x9e/0x1d0
[   17.226204]                                          [<ffffffff8149bdf0>] _raw_spin_lock+0x40/0x80
[   17.226208]                                          [<ffffffffa07e82c1>] nouveau_gpuobj_new+0xb1/0x2d0 [nouveau]
[   17.226225]                                          [<ffffffffa0844cec>] nv50_instmem_init+0x13c/0x530 [nouveau]
[   17.226244]                                          [<ffffffffa07e41db>] nouveau_card_init+0x12b/0x3d0 [nouveau]
[   17.226260]                                          [<ffffffffa07e47c9>] nouveau_load+0x329/0x550 [nouveau]
[   17.226275]                                          [<ffffffffa0759290>] drm_get_pci_dev+0x190/0x2c0 [drm]
[   17.226286]                                          [<ffffffffa0861e79>] nouveau_pci_probe+0x15/0x17 [nouveau]
[   17.226303]                                          [<ffffffff81296cdf>] local_pci_probe+0x5f/0xd0
[   17.226309]                                          [<ffffffff81297458>] pci_device_probe+0x88/0xb0
[   17.226314]                                          [<ffffffff8132ef78>] really_probe+0x68/0x190
[   17.226319]                                          [<ffffffff8132f285>] driver_probe_device+0x45/0x70
[   17.226324]                                          [<ffffffff8132f35b>] __driver_attach+0xab/0xb0
[   17.226329]                                          [<ffffffff8132e096>] bus_for_each_dev+0x66/0x90
[   17.226334]                                          [<ffffffff8132edce>] driver_attach+0x1e/0x20
[   17.226339]                                          [<ffffffff8132e998>] bus_add_driver+0x158/0x290
[   17.226343]                                          [<ffffffff8132f614>] driver_register+0x74/0x130
[   17.226348]                                          [<ffffffff812976d6>] __pci_register_driver+0x66/0xe0
[   17.226354]                                          [<ffffffffa075977f>] drm_pci_init+0xdf/0xf0 [drm]
[   17.226364]                                          [<ffffffffa0750748>] drm_init+0x58/0x70 [drm]
[   17.226373]                                          [<ffffffffa0887048>] nouveau_init+0x48/0x4a [nouveau]
[   17.226387]                                          [<ffffffff810002e4>] do_one_initcall+0x44/0x180
[   17.226392]                                          [<ffffffff8109693a>] sys_init_module+0xca/0x210
[   17.226397]                                          [<ffffffff8100268b>] system_call_fastpath+0x16/0x1b
[   17.226402]     INITIAL USE at:
[   17.226405]                                         [<ffffffff81086f9a>] __lock_acquire+0x3da/0xa80
[   17.226410]                                         [<ffffffff81087d4e>] lock_acquire+0x9e/0x1d0
[   17.226415]                                         [<ffffffff8149bdf0>] _raw_spin_lock+0x40/0x80
[   17.226420]                                         [<ffffffffa07e82c1>] nouveau_gpuobj_new+0xb1/0x2d0 [nouveau]
[   17.226436]                                         [<ffffffffa0844cec>] nv50_instmem_init+0x13c/0x530 [nouveau]
[   17.226456]                                         [<ffffffffa07e41db>] nouveau_card_init+0x12b/0x3d0 [nouveau]
[   17.226471]                                         [<ffffffffa07e47c9>] nouveau_load+0x329/0x550 [nouveau]
[   17.226486]                                         [<ffffffffa0759290>] drm_get_pci_dev+0x190/0x2c0 [drm]
[   17.226497]                                         [<ffffffffa0861e79>] nouveau_pci_probe+0x15/0x17 [nouveau]
[   17.226514]                                         [<ffffffff81296cdf>] local_pci_probe+0x5f/0xd0
[   17.226520]                                         [<ffffffff81297458>] pci_device_probe+0x88/0xb0
[   17.226525]                                         [<ffffffff8132ef78>] really_probe+0x68/0x190
[   17.226530]                                         [<ffffffff8132f285>] driver_probe_device+0x45/0x70
[   17.226535]                                         [<ffffffff8132f35b>] __driver_attach+0xab/0xb0
[   17.226540]                                         [<ffffffff8132e096>] bus_for_each_dev+0x66/0x90
[   17.226545]                                         [<ffffffff8132edce>] driver_attach+0x1e/0x20
[   17.226549]                                         [<ffffffff8132e998>] bus_add_driver+0x158/0x290
[   17.226554]                                         [<ffffffff8132f614>] driver_register+0x74/0x130
[   17.226559]                                         [<ffffffff812976d6>] __pci_register_driver+0x66/0xe0
[   17.226564]                                         [<ffffffffa075977f>] drm_pci_init+0xdf/0xf0 [drm]
[   17.226575]                                         [<ffffffffa0750748>] drm_init+0x58/0x70 [drm]
[   17.226583]                                         [<ffffffffa0887048>] nouveau_init+0x48/0x4a [nouveau]
[   17.226597]                                         [<ffffffff810002e4>] do_one_initcall+0x44/0x180
[   17.226602]                                         [<ffffffff8109693a>] sys_init_module+0xca/0x210
[   17.226607]                                         [<ffffffff8100268b>] system_call_fastpath+0x16/0x1b
[   17.226612]   }
[   17.226614]   ... key      at: [<ffffffffa0875d18>] __key.34306+0x0/0xfffffffffffec192 [nouveau]
[   17.226628]   ... acquired at:
[   17.226630]    [<ffffffff810841b1>] validate_chain.clone.19+0x5b1/0x6f0
[   17.226634]    [<ffffffff8108705d>] __lock_acquire+0x49d/0xa80
[   17.226638]    [<ffffffff81087d4e>] lock_acquire+0x9e/0x1d0
[   17.226643]    [<ffffffff8149bdf0>] _raw_spin_lock+0x40/0x80
[   17.226647]    [<ffffffffa08451e2>] nv84_instmem_flush+0x22/0xa0 [nouveau]
[   17.226666]    [<ffffffffa081404c>] nv50_fifo_create_context+0x26c/0x350 [nouveau]
[   17.226685]    [<ffffffffa07e573c>] nouveau_channel_alloc+0x22c/0x470 [nouveau]
[   17.226700]    [<ffffffffa07e3df1>] nouveau_card_init_channel+0x51/0x170 [nouveau]
[   17.226715]    [<ffffffffa07e4308>] nouveau_card_init+0x258/0x3d0 [nouveau]
[   17.226730]    [<ffffffffa07e47c9>] nouveau_load+0x329/0x550 [nouveau]
[   17.226745]    [<ffffffffa0759290>] drm_get_pci_dev+0x190/0x2c0 [drm]
[   17.226755]    [<ffffffffa0861e79>] nouveau_pci_probe+0x15/0x17 [nouveau]
[   17.226772]    [<ffffffff81296cdf>] local_pci_probe+0x5f/0xd0
[   17.226777]    [<ffffffff81297458>] pci_device_probe+0x88/0xb0
[   17.226781]    [<ffffffff8132ef78>] really_probe+0x68/0x190
[   17.226786]    [<ffffffff8132f285>] driver_probe_device+0x45/0x70
[   17.226791]    [<ffffffff8132f35b>] __driver_attach+0xab/0xb0
[   17.226795]    [<ffffffff8132e096>] bus_for_each_dev+0x66/0x90
[   17.226800]    [<ffffffff8132edce>] driver_attach+0x1e/0x20
[   17.226804]    [<ffffffff8132e998>] bus_add_driver+0x158/0x290
[   17.226808]    [<ffffffff8132f614>] driver_register+0x74/0x130
[   17.226813]    [<ffffffff812976d6>] __pci_register_driver+0x66/0xe0
[   17.226817]    [<ffffffffa075977f>] drm_pci_init+0xdf/0xf0 [drm]
[   17.226827]    [<ffffffffa0750748>] drm_init+0x58/0x70 [drm]
[   17.226836]    [<ffffffffa0887048>] nouveau_init+0x48/0x4a [nouveau]
[   17.226849]    [<ffffffff810002e4>] do_one_initcall+0x44/0x180
[   17.226853]    [<ffffffff8109693a>] sys_init_module+0xca/0x210
[   17.226858]    [<ffffffff8100268b>] system_call_fastpath+0x16/0x1b
[   17.226862] 
[   17.226864] -> (&(&dev_priv->context_switch_lock)->rlock){-.....} ops: 6 {
[   17.226870]    IN-HARDIRQ-W at:
[   17.226873]                                        [<ffffffff8108500d>] mark_irqflags+0x19d/0x1c0
[   17.226878]                                        [<ffffffff8108716c>] __lock_acquire+0x5ac/0xa80
[   17.226883]                                        [<ffffffff81087d4e>] lock_acquire+0x9e/0x1d0
[   17.226887]                                        [<ffffffff8149bfa2>] _raw_spin_lock_irqsave+0x52/0x90
[   17.226892]                                        [<ffffffffa07e93bf>] nouveau_irq_handler+0x5f/0x130 [nouveau]
[   17.226909]                                        [<ffffffff810a6fd9>] handle_IRQ_event+0x79/0x2f0
[   17.226915]                                        [<ffffffff810a99fd>] handle_fasteoi_irq+0x7d/0x100
[   17.226920]                                        [<ffffffff81004e52>] handle_irq+0x22/0x40
[   17.226925]                                        [<ffffffff81004add>] do_IRQ+0x5d/0xe0
[   17.226930]                                        [<ffffffff8149d153>] ret_from_intr+0x0/0x13
[   17.226935]                                        [<ffffffff8149a523>] mutex_lock_nested+0x73/0x3b0
[   17.226940]                                        [<ffffffff8122e367>] debugfs_create_by_name+0x57/0x1d0
[   17.226945]                                        [<ffffffff8122e568>] debugfs_create_file+0x88/0xb0
[   17.226950]                                        [<ffffffff8122e62b>] debugfs_create_dir+0x1b/0x20
[   17.226954]                                        [<ffffffffa086141a>] nouveau_debugfs_channel_init+0xca/0xf0 [nouveau]
[   17.226974]                                        [<ffffffffa07e57d1>] nouveau_channel_alloc+0x2c1/0x470 [nouveau]
[   17.226990]                                        [<ffffffffa07e3df1>] nouveau_card_init_channel+0x51/0x170 [nouveau]
[   17.227005]                                        [<ffffffffa07e4308>] nouveau_card_init+0x258/0x3d0 [nouveau]
[   17.227021]                                        [<ffffffffa07e47c9>] nouveau_load+0x329/0x550 [nouveau]
[   17.227036]                                        [<ffffffffa0759290>] drm_get_pci_dev+0x190/0x2c0 [drm]
[   17.227047]                                        [<ffffffffa0861e79>] nouveau_pci_probe+0x15/0x17 [nouveau]
[   17.227065]                                        [<ffffffff81296cdf>] local_pci_probe+0x5f/0xd0
[   17.227070]                                        [<ffffffff81297458>] pci_device_probe+0x88/0xb0
[   17.227075]                                        [<ffffffff8132ef78>] really_probe+0x68/0x190
[   17.227080]                                        [<ffffffff8132f285>] driver_probe_device+0x45/0x70
[   17.227085]                                        [<ffffffff8132f35b>] __driver_attach+0xab/0xb0
[   17.227090]                                        [<ffffffff8132e096>] bus_for_each_dev+0x66/0x90
[   17.227095]                                        [<ffffffff8132edce>] driver_attach+0x1e/0x20
[   17.227100]                                        [<ffffffff8132e998>] bus_add_driver+0x158/0x290
[   17.227105]                                        [<ffffffff8132f614>] driver_register+0x74/0x130
[   17.227110]                                        [<ffffffff812976d6>] __pci_register_driver+0x66/0xe0
[   17.227115]                                        [<ffffffffa075977f>] drm_pci_init+0xdf/0xf0 [drm]
[   17.227125]                                        [<ffffffffa0750748>] drm_init+0x58/0x70 [drm]
[   17.227134]                                        [<ffffffffa0887048>] nouveau_init+0x48/0x4a [nouveau]
[   17.227148]                                        [<ffffffff810002e4>] do_one_initcall+0x44/0x180
[   17.227153]                                        [<ffffffff8109693a>] sys_init_module+0xca/0x210
[   17.227158]                                        [<ffffffff8100268b>] system_call_fastpath+0x16/0x1b
[   17.227163]    INITIAL USE at:
[   17.227166]                                       [<ffffffff81086f9a>] __lock_acquire+0x3da/0xa80
[   17.227171]                                       [<ffffffff81087d4e>] lock_acquire+0x9e/0x1d0
[   17.227175]                                       [<ffffffff8149bfa2>] _raw_spin_lock_irqsave+0x52/0x90
[   17.227180]                                       [<ffffffffa07e95bf>] nouveau_irq_register+0x3f/0x70 [nouveau]
[   17.227197]                                       [<ffffffffa085f5e2>] nv50_gpio_init+0x82/0x150 [nouveau]
[   17.227217]                                       [<ffffffffa07e4218>] nouveau_card_init+0x168/0x3d0 [nouveau]
[   17.227233]                                       [<ffffffffa07e47c9>] nouveau_load+0x329/0x550 [nouveau]
[   17.227248]                                       [<ffffffffa0759290>] drm_get_pci_dev+0x190/0x2c0 [drm]
[   17.227259]                                       [<ffffffffa0861e79>] nouveau_pci_probe+0x15/0x17 [nouveau]
[   17.227276]                                       [<ffffffff81296cdf>] local_pci_probe+0x5f/0xd0
[   17.227281]                                       [<ffffffff81297458>] pci_device_probe+0x88/0xb0
[   17.227286]                                       [<ffffffff8132ef78>] really_probe+0x68/0x190
[   17.227291]                                       [<ffffffff8132f285>] driver_probe_device+0x45/0x70
[   17.227296]                                       [<ffffffff8132f35b>] __driver_attach+0xab/0xb0
[   17.227301]                                       [<ffffffff8132e096>] bus_for_each_dev+0x66/0x90
[   17.227306]                                       [<ffffffff8132edce>] driver_attach+0x1e/0x20
[   17.227310]                                       [<ffffffff8132e998>] bus_add_driver+0x158/0x290
[   17.227315]                                       [<ffffffff8132f614>] driver_register+0x74/0x130
[   17.227320]                                       [<ffffffff812976d6>] __pci_register_driver+0x66/0xe0
[   17.227325]                                       [<ffffffffa075977f>] drm_pci_init+0xdf/0xf0 [drm]
[   17.227336]                                       [<ffffffffa0750748>] drm_init+0x58/0x70 [drm]
[   17.227344]                                       [<ffffffffa0887048>] nouveau_init+0x48/0x4a [nouveau]
[   17.227358]                                       [<ffffffff810002e4>] do_one_initcall+0x44/0x180
[   17.227363]                                       [<ffffffff8109693a>] sys_init_module+0xca/0x210
[   17.227368]                                       [<ffffffff8100268b>] system_call_fastpath+0x16/0x1b
[   17.227373]  }
[   17.227374]  ... key      at: [<ffffffffa0875cf8>] __key.34928+0x0/0xfffffffffffec1b2 [nouveau]
[   17.227388]  ... acquired at:
[   17.227390]    [<ffffffff81082cb9>] check_usage_forwards+0x89/0x100
[   17.227395]    [<ffffffff81084839>] mark_lock_irq+0x99/0x2b0
[   17.227399]    [<ffffffff81084bc1>] mark_lock+0x171/0x420
[   17.227403]    [<ffffffff8108500d>] mark_irqflags+0x19d/0x1c0
[   17.227407]    [<ffffffff8108716c>] __lock_acquire+0x5ac/0xa80
[   17.227411]    [<ffffffff81087d4e>] lock_acquire+0x9e/0x1d0
[   17.227416]    [<ffffffff8149bfa2>] _raw_spin_lock_irqsave+0x52/0x90
[   17.227420]    [<ffffffffa07e93bf>] nouveau_irq_handler+0x5f/0x130 [nouveau]
[   17.227436]    [<ffffffff810a6fd9>] handle_IRQ_event+0x79/0x2f0
[   17.227440]    [<ffffffff810a99fd>] handle_fasteoi_irq+0x7d/0x100
[   17.227445]    [<ffffffff81004e52>] handle_irq+0x22/0x40
[   17.227449]    [<ffffffff81004add>] do_IRQ+0x5d/0xe0
[   17.227453]    [<ffffffff8149d153>] ret_from_intr+0x0/0x13
[   17.227457]    [<ffffffff8149a523>] mutex_lock_nested+0x73/0x3b0
[   17.227461]    [<ffffffff8122e367>] debugfs_create_by_name+0x57/0x1d0
[   17.227466]    [<ffffffff8122e568>] debugfs_create_file+0x88/0xb0
[   17.227470]    [<ffffffff8122e62b>] debugfs_create_dir+0x1b/0x20
[   17.227474]    [<ffffffffa086141a>] nouveau_debugfs_channel_init+0xca/0xf0 [nouveau]
[   17.227493]    [<ffffffffa07e57d1>] nouveau_channel_alloc+0x2c1/0x470 [nouveau]
[   17.227508]    [<ffffffffa07e3df1>] nouveau_card_init_channel+0x51/0x170 [nouveau]
[   17.227523]    [<ffffffffa07e4308>] nouveau_card_init+0x258/0x3d0 [nouveau]
[   17.227538]    [<ffffffffa07e47c9>] nouveau_load+0x329/0x550 [nouveau]
[   17.227553]    [<ffffffffa0759290>] drm_get_pci_dev+0x190/0x2c0 [drm]
[   17.227563]    [<ffffffffa0861e79>] nouveau_pci_probe+0x15/0x17 [nouveau]
[   17.227580]    [<ffffffff81296cdf>] local_pci_probe+0x5f/0xd0
[   17.227585]    [<ffffffff81297458>] pci_device_probe+0x88/0xb0
[   17.227589]    [<ffffffff8132ef78>] really_probe+0x68/0x190
[   17.227594]    [<ffffffff8132f285>] driver_probe_device+0x45/0x70
[   17.227598]    [<ffffffff8132f35b>] __driver_attach+0xab/0xb0
[   17.227602]    [<ffffffff8132e096>] bus_for_each_dev+0x66/0x90
[   17.227607]    [<ffffffff8132edce>] driver_attach+0x1e/0x20
[   17.227611]    [<ffffffff8132e998>] bus_add_driver+0x158/0x290
[   17.227616]    [<ffffffff8132f614>] driver_register+0x74/0x130
[   17.227620]    [<ffffffff812976d6>] __pci_register_driver+0x66/0xe0
[   17.227625]    [<ffffffffa075977f>] drm_pci_init+0xdf/0xf0 [drm]
[   17.227635]    [<ffffffffa0750748>] drm_init+0x58/0x70 [drm]
[   17.227643]    [<ffffffffa0887048>] nouveau_init+0x48/0x4a [nouveau]
[   17.227656]    [<ffffffff810002e4>] do_one_initcall+0x44/0x180
[   17.227661]    [<ffffffff8109693a>] sys_init_module+0xca/0x210
[   17.227665]    [<ffffffff8100268b>] system_call_fastpath+0x16/0x1b
[   17.227669] 
[   17.227671] 
[   17.227672] stack backtrace:
[   17.227675] Pid: 2506, comm: modprobe Not tainted 2.6.38-wl-65107-gc5f1016-dirty #211
[   17.227678] Call Trace:
[   17.227680]  <IRQ>  [<ffffffff81082c07>] ? print_irq_inversion_bug+0x137/0x160
[   17.227689]  [<ffffffff81082cb9>] ? check_usage_forwards+0x89/0x100
[   17.227695]  [<ffffffff810759b5>] ? sched_clock_local+0x25/0x90
[   17.227699]  [<ffffffff81082c30>] ? check_usage_forwards+0x0/0x100
[   17.227704]  [<ffffffff81084839>] ? mark_lock_irq+0x99/0x2b0
[   17.227708]  [<ffffffff810109cd>] ? save_stack_trace+0x2d/0x50
[   17.227713]  [<ffffffff81084bc1>] ? mark_lock+0x171/0x420
[   17.227717]  [<ffffffff8108500d>] ? mark_irqflags+0x19d/0x1c0
[   17.227722]  [<ffffffff8108716c>] ? __lock_acquire+0x5ac/0xa80
[   17.227726]  [<ffffffff8149cb65>] ? _raw_spin_unlock+0x55/0x60
[   17.227731]  [<ffffffff81009d79>] ? native_sched_clock+0x29/0x80
[   17.227735]  [<ffffffff81087d4e>] ? lock_acquire+0x9e/0x1d0
[   17.227751]  [<ffffffffa07e93bf>] ? nouveau_irq_handler+0x5f/0x130 [nouveau]
[   17.227756]  [<ffffffff8149bfa2>] ? _raw_spin_lock_irqsave+0x52/0x90
[   17.227772]  [<ffffffffa07e93bf>] ? nouveau_irq_handler+0x5f/0x130 [nouveau]
[   17.227776]  [<ffffffff81075b48>] ? sched_clock_cpu+0xa8/0x120
[   17.227792]  [<ffffffffa07e93bf>] ? nouveau_irq_handler+0x5f/0x130 [nouveau]
[   17.227797]  [<ffffffff8108178e>] ? put_lock_stats.clone.14+0xe/0x40
[   17.227801]  [<ffffffff81081868>] ? lock_release_holdtime+0xa8/0x150
[   17.227806]  [<ffffffff810a6fd9>] ? handle_IRQ_event+0x79/0x2f0
[   17.227810]  [<ffffffff810a99f2>] ? handle_fasteoi_irq+0x72/0x100
[   17.227816]  [<ffffffff810a99fd>] ? handle_fasteoi_irq+0x7d/0x100
[   17.227820]  [<ffffffff81004e52>] ? handle_irq+0x22/0x40
[   17.227824]  [<ffffffff81004add>] ? do_IRQ+0x5d/0xe0
[   17.227828]  [<ffffffff8149d153>] ? ret_from_intr+0x0/0x13
[   17.227831]  <EOI>  [<ffffffff81087d63>] ? lock_acquire+0xb3/0x1d0
[   17.227840]  [<ffffffff8122e367>] ? debugfs_create_by_name+0x57/0x1d0
[   17.227844]  [<ffffffff81075b48>] ? sched_clock_cpu+0xa8/0x120
[   17.227849]  [<ffffffff8149a523>] ? mutex_lock_nested+0x73/0x3b0
[   17.227853]  [<ffffffff8122e367>] ? debugfs_create_by_name+0x57/0x1d0
[   17.227859]  [<ffffffff8114487d>] ? simple_pin_fs+0x4d/0xb0
[   17.227863]  [<ffffffff8122e367>] ? debugfs_create_by_name+0x57/0x1d0
[   17.227868]  [<ffffffff8114487d>] ? simple_pin_fs+0x4d/0xb0
[   17.227873]  [<ffffffff8103f221>] ? get_parent_ip+0x11/0x50
[   17.227878]  [<ffffffff8122e367>] ? debugfs_create_by_name+0x57/0x1d0
[   17.227883]  [<ffffffff8122e568>] ? debugfs_create_file+0x88/0xb0
[   17.227887]  [<ffffffff8122e62b>] ? debugfs_create_dir+0x1b/0x20
[   17.227906]  [<ffffffffa086141a>] ? nouveau_debugfs_channel_init+0xca/0xf0 [nouveau]
[   17.227922]  [<ffffffffa07e57d1>] ? nouveau_channel_alloc+0x2c1/0x470 [nouveau]
[   17.227938]  [<ffffffffa07e3df1>] ? nouveau_card_init_channel+0x51/0x170 [nouveau]
[   17.227953]  [<ffffffffa07e4308>] ? nouveau_card_init+0x258/0x3d0 [nouveau]
[   17.227968]  [<ffffffffa07e47c9>] ? nouveau_load+0x329/0x550 [nouveau]
[   17.227980]  [<ffffffffa0759290>] ? drm_get_pci_dev+0x190/0x2c0 [drm]
[   17.227997]  [<ffffffffa0861e79>] ? nouveau_pci_probe+0x15/0x17 [nouveau]
[   17.228002]  [<ffffffff81296cdf>] ? local_pci_probe+0x5f/0xd0
[   17.228007]  [<ffffffff81297458>] ? pci_device_probe+0x88/0xb0
[   17.228012]  [<ffffffff8132ee4a>] ? driver_sysfs_add+0x7a/0xb0
[   17.228016]  [<ffffffff8132ef78>] ? really_probe+0x68/0x190
[   17.228021]  [<ffffffff8132f285>] ? driver_probe_device+0x45/0x70
[   17.228026]  [<ffffffff8132f35b>] ? __driver_attach+0xab/0xb0
[   17.228030]  [<ffffffff8132f2b0>] ? __driver_attach+0x0/0xb0
[   17.228035]  [<ffffffff8132e096>] ? bus_for_each_dev+0x66/0x90
[   17.228039]  [<ffffffff8132edce>] ? driver_attach+0x1e/0x20
[   17.228044]  [<ffffffff8132e998>] ? bus_add_driver+0x158/0x290
[   17.228057]  [<ffffffffa0887000>] ? nouveau_init+0x0/0x4a [nouveau]
[   17.228062]  [<ffffffff8132f614>] ? driver_register+0x74/0x130
[   17.228076]  [<ffffffffa0887000>] ? nouveau_init+0x0/0x4a [nouveau]
[   17.228081]  [<ffffffff812976d6>] ? __pci_register_driver+0x66/0xe0
[   17.228092]  [<ffffffffa075977f>] ? drm_pci_init+0xdf/0xf0 [drm]
[   17.228105]  [<ffffffffa0887000>] ? nouveau_init+0x0/0x4a [nouveau]
[   17.228114]  [<ffffffffa0750748>] ? drm_init+0x58/0x70 [drm]
[   17.228127]  [<ffffffffa0887048>] ? nouveau_init+0x48/0x4a [nouveau]
[   17.228132]  [<ffffffff810002e4>] ? do_one_initcall+0x44/0x180
[   17.228137]  [<ffffffff8109693a>] ? sys_init_module+0xca/0x210
[   17.228141]  [<ffffffff8100268b>] ? system_call_fastpath+0x16/0x1b
Comment 1 Andrew Morton 2011-03-30 21:26:16 UTC
Kernel version is unclear.  Is this a 2.6.37->2.6.38 regression, or a post-2.6.38 regression?

Thanks.
Comment 2 Lucas Stach 2011-03-30 22:18:22 UTC
I think this problem was introduced by 6f70a4c3d19e8e8e1047a4dbf0ca910fed39f619. This commit fixes a real problem, so it shouldn't be reverted, but still this issue needs to be fixed.

It seems Ben isn't registered here at kernel bugzilla. I will drop him a mail about this.
Comment 3 Lucas Stach 2011-03-31 06:08:35 UTC
Created attachment 52722 [details]
slight lock reordering from Ben

Could you please test the attached patch? It should fix the problem, but as I'm physically away from my nvidia machine I could not test it myself.
Comment 4 Johannes Berg 2011-03-31 07:05:53 UTC
Sorry for being unclear, it's a regression from 2.6.37 to 2.6.38. Compiling a kernel with the patch now.
Comment 5 Johannes Berg 2011-03-31 07:49:36 UTC
Patch doesn't help, lockdep output looks the same as before (to me anyway, same locks involved and same complaint).
Comment 6 Lucas Stach 2011-04-17 14:15:07 UTC
Created attachment 54522 [details]
fix in nouveau tree

Could you please try the attached patch? It is already in nouveau tree and should hopefully fix the issue. Just want to make sure if we can close this bug.
Comment 7 Johannes Berg 2011-04-18 09:56:16 UTC
I'm now on 2.6.39-rc3 and while the issue persists, the patch doesn't apply.
Comment 8 Johannes Berg 2011-04-18 12:50:17 UTC
Actually, that was wrong -- I wasn't booting the kernel I was compiling, 2.6.39-rc3 doesn't work at all, I only get a garbled screen :-(
Comment 9 Florian Mickler 2011-05-01 14:19:55 UTC
The Patch from comment #6 has been merged in 2.6.39-rc5. Can you retest with that?
Comment 10 Johannes Berg 2011-05-15 06:24:28 UTC
Sorry, I must've missed your email earlier -- I'm now on 2.6.39-rc7 and it doesn't seem to have this issue any more.