i915 fbdev AB/BA locking issue

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

 



Hi Chris,
I'm assuming this has come from the async fbdev work: I'm now (today's
din) getting lockdep splat about AB/BA between the fbdev notifier lock
versus mode_config. It's attached below; seems like it should probably
be fixed up. I guess it only shows on systems with a backlight (in my
case, eDP).

ul 20 15:07:55 strictly kernel: fbcon: inteldrmfb (fb0) is primary device
Jul 20 15:07:55 strictly kernel:
Jul 20 15:07:55 strictly kernel:
======================================================
Jul 20 15:07:55 strictly kernel: [ INFO: possible circular locking
dependency detected ]
Jul 20 15:07:55 strictly kernel: 4.7.0-rc7-xps13+ #19 Not tainted
Jul 20 15:07:55 strictly kernel:
-------------------------------------------------------
Jul 20 15:07:55 strictly kernel: kworker/u8:1/83 is trying to acquire lock:
Jul 20 15:07:55 strictly kernel:  (&dev->mode_config.mutex){+.+.+.},
at: [<ffffffffa0039a30>] drm_modeset_lock_all+0x40/0x120 [drm]
Jul 20 15:07:55 strictly kernel:
                                 but task is already holding lock:
Jul 20 15:07:55 strictly kernel:  ((fb_notifier_list).rwsem){++++.+},
at: [<ffffffff810b3955>] __blocking_notifier_call_chain+0x35/0x70
Jul 20 15:07:55 strictly kernel:
                                 which lock already depends on the new lock.
Jul 20 15:07:55 strictly kernel:
                                 the existing dependency chain (in
reverse order) is:
Jul 20 15:07:55 strictly kernel:
                                 -> #1 ((fb_notifier_list).rwsem){++++.+}:
Jul 20 15:07:55 strictly kernel:        [<ffffffff810e793e>]
lock_acquire+0xfe/0x1f0
Jul 20 15:07:55 strictly kernel:        [<ffffffff817b2af9>]
down_write+0x49/0x80
Jul 20 15:07:55 strictly kernel:        [<ffffffff810b3ae1>]
blocking_notifier_chain_register+0x21/0xb0
Jul 20 15:07:55 strictly kernel:        [<ffffffff81434e88>]
fb_register_client+0x18/0x20
Jul 20 15:07:55 strictly kernel:        [<ffffffff81434666>]
backlight_device_register+0x136/0x250
Jul 20 15:07:55 strictly kernel:        [<ffffffffa01a31b4>]
intel_backlight_device_register+0xb4/0x190 [i915]
Jul 20 15:07:55 strictly kernel:        [<ffffffffa017025e>]
intel_connector_register+0xe/0x10 [i915]
Jul 20 15:07:55 strictly kernel:        [<ffffffffa018cc0b>]
intel_dp_connector_register+0x1b/0x80 [i915]
Jul 20 15:07:55 strictly kernel:        [<ffffffffa0027ef1>]
drm_connector_register+0x51/0x90 [drm]
Jul 20 15:07:55 strictly kernel:        [<ffffffffa002c4ea>]
drm_modeset_register_all+0x13a/0x240 [drm]
Jul 20 15:07:55 strictly kernel:        [<ffffffffa0023662>]
drm_dev_register+0xc2/0xd0 [drm]
Jul 20 15:07:55 strictly kernel:        [<ffffffffa00dd2eb>]
i915_driver_load+0x75b/0x1470 [i915]
Jul 20 15:07:55 strictly kernel:        [<ffffffffa00e88cf>]
i915_pci_probe+0x4f/0x70 [i915]
Jul 20 15:07:55 strictly kernel:        [<ffffffff81409480>]
pci_device_probe+0x90/0x100
Jul 20 15:07:55 strictly kernel:        [<ffffffff814fd9fc>]
driver_probe_device+0x22c/0x440
Jul 20 15:07:55 strictly kernel:        [<ffffffff814fdce5>]
__driver_attach+0xd5/0x100
Jul 20 15:07:55 strictly kernel:        [<ffffffff814fb243>]
bus_for_each_dev+0x73/0xc0
Jul 20 15:07:55 strictly kernel:        [<ffffffff814fd0ce>]
driver_attach+0x1e/0x20
Jul 20 15:07:55 strictly kernel:        [<ffffffff814fcaf6>]
bus_add_driver+0x1c6/0x290
Jul 20 15:07:55 strictly kernel:        [<ffffffff814fe9a0>]
driver_register+0x60/0xe0
Jul 20 15:07:55 strictly kernel:        [<ffffffff81407a70>]
__pci_register_driver+0x60/0x70
Jul 20 15:07:55 strictly kernel:        [<ffffffffa022605b>]
i915_init+0x5b/0x62 [i915]
Jul 20 15:07:55 strictly kernel:        [<ffffffff81000450>]
do_one_initcall+0x50/0x180
Jul 20 15:07:55 strictly kernel:        [<ffffffff811b509c>]
do_init_module+0x5f/0x1da
Jul 20 15:07:55 strictly kernel:        [<ffffffff8112e9e8>]
load_module+0x23a8/0x28f0
Jul 20 15:07:55 strictly kernel:        [<ffffffff8112f1b6>]
SYSC_finit_module+0xe6/0x120
Jul 20 15:07:55 strictly kernel:        [<ffffffff8112f20e>]
SyS_finit_module+0xe/0x10
Jul 20 15:07:55 strictly kernel:        [<ffffffff817b557c>]
entry_SYSCALL_64_fastpath+0x1f/0xbd
Jul 20 15:07:55 strictly kernel:
                                 -> #0 (&dev->mode_config.mutex){+.+.+.}:
Jul 20 15:07:55 strictly kernel:        [<ffffffff810e7498>]
__lock_acquire+0x1218/0x1260
Jul 20 15:07:55 strictly kernel:        [<ffffffff810e793e>]
lock_acquire+0xfe/0x1f0
Jul 20 15:07:55 strictly kernel:        [<ffffffff817b0589>]
mutex_lock_nested+0x79/0x3c0
Jul 20 15:07:55 strictly kernel:        [<ffffffffa0039a30>]
drm_modeset_lock_all+0x40/0x120 [drm]
Jul 20 15:07:55 strictly kernel:        [<ffffffffa00aa59c>]
drm_fb_helper_restore_fbdev_mode_unlocked+0x2c/0x80 [drm_kms_helper]
Jul 20 15:07:55 strictly kernel:        [<ffffffffa00aa61d>]
drm_fb_helper_set_par+0x2d/0x50 [drm_kms_helper]
Jul 20 15:07:55 strictly kernel:        [<ffffffffa018172a>]
intel_fbdev_set_par+0x1a/0x60 [i915]
Jul 20 15:07:55 strictly kernel:        [<ffffffff8142e8f1>]
fbcon_init+0x581/0x600
Jul 20 15:07:55 strictly kernel:        [<ffffffff814c0836>]
visual_init+0xd6/0x130
Jul 20 15:07:55 strictly kernel:        [<ffffffff814c1f6a>]
do_bind_con_driver+0x1da/0x3c0
Jul 20 15:07:55 strictly kernel:        [<ffffffff814c2486>]
do_take_over_console+0x116/0x180
Jul 20 15:07:55 strictly kernel:        [<ffffffff8142a65c>]
do_fbcon_takeover+0x5c/0xb0
Jul 20 15:07:55 strictly kernel:        [<ffffffff8142f3ed>]
fbcon_event_notify+0x69d/0x7a0
Jul 20 15:07:55 strictly kernel:        [<ffffffff810b37bd>]
notifier_call_chain+0x5d/0x80
Jul 20 15:07:55 strictly kernel:        [<ffffffff810b396d>]
__blocking_notifier_call_chain+0x4d/0x70
Jul 20 15:07:55 strictly kernel:        [<ffffffff810b39a6>]
blocking_notifier_call_chain+0x16/0x20
Jul 20 15:07:55 strictly kernel:        [<ffffffff81434ecb>]
fb_notifier_call_chain+0x1b/0x20
Jul 20 15:07:55 strictly kernel:        [<ffffffff81437088>]
register_framebuffer+0x278/0x360
Jul 20 15:07:55 strictly kernel:        [<ffffffffa00aa8d0>]
drm_fb_helper_initial_config+0x290/0x420 [drm_kms_helper]
Jul 20 15:07:55 strictly kernel:        [<ffffffffa01822f8>]
intel_fbdev_initial_config+0x18/0x30 [i915]
Jul 20 15:07:55 strictly kernel:        [<ffffffff810b53ca>]
async_run_entry_fn+0x4a/0x140
Jul 20 15:07:55 strictly kernel:        [<ffffffff810ab423>]
process_one_work+0x203/0x6c0
Jul 20 15:07:55 strictly kernel:        [<ffffffff810ab92e>]
worker_thread+0x4e/0x490
Jul 20 15:07:55 strictly kernel:        [<ffffffff810b22de>] kthread+0xfe/0x120
Jul 20 15:07:55 strictly kernel:        [<ffffffff817b57af>]
ret_from_fork+0x1f/0x40
Jul 20 15:07:55 strictly kernel:
                                 other info that might help us debug this:
Jul 20 15:07:55 strictly kernel:  Possible unsafe locking scenario:
Jul 20 15:07:55 strictly kernel:        CPU0                    CPU1
Jul 20 15:07:55 strictly kernel:        ----                    ----
Jul 20 15:07:55 strictly kernel:   lock((fb_notifier_list).rwsem);
Jul 20 15:07:55 strictly kernel:
lock(&dev->mode_config.mutex);
Jul 20 15:07:55 strictly kernel:
lock((fb_notifier_list).rwsem);
Jul 20 15:07:55 strictly kernel:   lock(&dev->mode_config.mutex);

Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux