FYI, we noticed the following commit:
git://anongit.freedesktop.org/drm-intel topic/drm-misc commit e28cd4d0a223e1bcea616326e2281900e7e7e9a2 ("drm: Automatically register/unregister all connectors")
on test machine: vm-lkp-wsx03-yocto-i386: 1 threads qemu-system-i386 -enable-kvm with 320M memory
caused below changes:
+------------------------------------------+------------+------------+ | | acd8f414c9 | e28cd4d0a2 | +------------------------------------------+------------+------------+ | boot_successes | 71 | 0 | | boot_failures | 0 | 8 | | INFO:trying_to_register_non-static_key | 0 | 8 | | BUG:unable_to_handle_kernel | 0 | 8 | | Oops:#[##] | 0 | 8 | | EIP_is_at_mutex_lock_nested | 0 | 8 | | Kernel_panic-not_syncing:Fatal_exception | 0 | 8 | | backtrace:drm_dev_register | 0 | 8 | | backtrace:vgem_init | 0 | 8 | | backtrace:kernel_init_freeable | 0 | 8 | +------------------------------------------+------------+------------+
[ 1.338384] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 1.340531] toshiba: not a supported Toshiba laptop [ 1.341126] [drm] Initialized drm 1.1.0 20060810 [ 1.342029] INFO: trying to register non-static key. [ 1.342535] the code is fine but needs lockdep annotation. [ 1.343074] turning off the locking correctness validator. [ 1.343610] CPU: 0 PID: 1 Comm: swapper Not tainted 4.7.0-rc2-00564-ge28cd4d #1 [ 1.344330] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014 [ 1.345192] 00000000 00000000 d28dbdc8 c12a197b d28dbe04 c1058c18 c16986b2 c169870c [ 1.346063] c16986e2 c14e3fdc 00000000 00000000 d28dbdf0 c1027c67 00000000 00000000 [ 1.346917] d39e8b24 00000001 00000000 d28dbe74 c105b796 c14e3fdc c1af7ee4 c1af7ee4 [ 1.347772] Call Trace: [ 1.348031] [<c12a197b>] dump_stack+0x16/0x18 [ 1.348450] [<c1058c18>] register_lock_class+0x164/0x3d1 [ 1.348985] [<c1027c67>] ? kvm_sched_clock_read+0x9/0x18 [ 1.349509] [<c105b796>] __lock_acquire+0x95/0x13c4 [ 1.350007] [<c105c7d3>] ? __lock_acquire+0x10d2/0x13c4 [ 1.350530] [<c10588a5>] ? __lock_is_held+0x24/0x43 [ 1.351029] [<c105cdac>] lock_acquire+0x59/0x77 [ 1.351477] [<c1361cf9>] ? drm_connector_register_all+0x1a/0x92 [ 1.352053] [<c14db8db>] mutex_lock_nested+0x4d/0x2c3 [ 1.352554] [<c1361cf9>] ? drm_connector_register_all+0x1a/0x92 [ 1.353140] [<c1361cf9>] ? drm_connector_register_all+0x1a/0x92 [ 1.353720] [<c105b4bf>] ? trace_hardirqs_on+0xb/0xd [ 1.354239] [<c1361cf9>] drm_connector_register_all+0x1a/0x92 [ 1.354845] [<c10b25be>] ? kstrdup+0x25/0x3a [ 1.355271] [<c135e37d>] drm_dev_register+0x59/0x99 [ 1.355781] [<c195ea3e>] vgem_init+0x34/0x49 [ 1.356213] [<c195ea0a>] ? mipi_dsi_bus_init+0xf/0xf [ 1.356702] [<c100048f>] do_one_initcall+0x7c/0xfd [ 1.357182] [<c104b409>] ? parse_args+0x1fd/0x314 [ 1.357648] [<c1939c10>] ? kernel_init_freeable+0xd0/0x179 [ 1.358203] [<c1939c2c>] kernel_init_freeable+0xec/0x179 [ 1.358763] [<c14d66ea>] kernel_init+0x8/0xcb [ 1.359222] [<c14debce>] ret_from_kernel_thread+0xe/0x30 [ 1.359744] [<c14d66e2>] ? rest_init+0x10e/0x10e [ 1.360244] BUG: unable to handle kernel NULL pointer dereference at (null) [ 1.360972] IP: [<c14db9ad>] mutex_lock_nested+0x11f/0x2c3 [ 1.361512] *pde = 00000000 [ 1.361827] Oops: 0002 [#1] [ 1.362123] Modules linked in: [ 1.362451] CPU: 0 PID: 1 Comm: swapper Not tainted 4.7.0-rc2-00564-ge28cd4d #1 [ 1.363202] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014 [ 1.364105] task: c03d0000 ti: d28da000 task.ti: d28da000 [ 1.364636] EIP: 0060:[<c14db9ad>] EFLAGS: 00210096 CPU: 0 [ 1.365215] EIP is at mutex_lock_nested+0x11f/0x2c3 [ 1.365703] EAX: 00000000 EBX: d39e8ae8 ECX: d39e8b14 EDX: c1361cf9 [ 1.366351] ESI: c03d0000 EDI: d28dbed0 EBP: d28dbeec ESP: d28dbec0 [ 1.367010] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 [ 1.367534] CR0: 80050033 CR2: 00000000 CR3: 019a9000 CR4: 00000690 [ 1.368152] Stack: [ 1.368356] d39e8b14 d39e8b24 c1361cf9 00200246 d39e8b14 00000000 11111111 d28dbed0 [ 1.369235] d39e8800 d39e8ae8 00000000 d28dbf08 c1361cf9 d28dbf0c c10b25be d39e8800 [ 1.370087] 00000000 00000000 d28dbf1c c135e37d fffffff4 ffffffff 00000000 d28dbf28 [ 1.371012] Call Trace: [ 1.371272] [<c1361cf9>] ? drm_connector_register_all+0x1a/0x92 [ 1.371847] [<c1361cf9>] drm_connector_register_all+0x1a/0x92 [ 1.372421] [<c10b25be>] ? kstrdup+0x25/0x3a [ 1.372863] [<c135e37d>] drm_dev_register+0x59/0x99 [ 1.373358] [<c195ea3e>] vgem_init+0x34/0x49 [ 1.373770] [<c195ea0a>] ? mipi_dsi_bus_init+0xf/0xf [ 1.374257] [<c100048f>] do_one_initcall+0x7c/0xfd [ 1.374754] [<c104b409>] ? parse_args+0x1fd/0x314 [ 1.375259] [<c1939c10>] ? kernel_init_freeable+0xd0/0x179 [ 1.375837] [<c1939c2c>] kernel_init_freeable+0xec/0x179 [ 1.376371] [<c14d66ea>] kernel_init+0x8/0xcb [ 1.376806] [<c14debce>] ret_from_kernel_thread+0xe/0x30 [ 1.377322] [<c14d66e2>] ? rest_init+0x10e/0x10e [ 1.377754] Code: 89 fa e8 71 c5 b7 ff 8b 4e 04 89 fa 89 d8 e8 8e c6 b7 ff 8d 43 2c 89 45 d4 8b 43 30 8d 4b 2c 89 45 e8 89 7b 30 89 4d e4 8b 55 dc <89> 38 8d 43 3c 89 75 ec e8 c9 dd b7 ff eb 0c 31 c0 87 03 48 75 [ 1.380442] EIP: [<c14db9ad>] mutex_lock_nested+0x11f/0x2c3 SS:ESP 0068:d28dbec0 [ 1.381174] CR2: 0000000000000000 [ 1.381503] ---[ end trace e260f2ca50706006 ]--- [ 1.381966] Kernel panic - not syncing: Fatal exception
FYI, raw QEMU command line is:
qemu-system-i386 -enable-kvm -kernel /pkg/linux/i386-randconfig-b0-06172203/gcc-6/e28cd4d0a223e1bcea616326e2281900e7e7e9a2/vmlinuz-4.7.0-rc2-00564-ge28cd4d -append 'root=/dev/ram0 user=lkp job=/lkp/scheduled/vm-lkp-wsx03-yocto-i386-2/bisect_boot-1-yocto-minimal-i386.cgz-i386-randconfig-b0-06172203-e28cd4d0a223e1bcea616326e2281900e7e7e9a2-20160618-131023-156vzgq-0.yaml~ ARCH=i386 kconfig=i386-randconfig-b0-06172203 branch=linux-devel/devel-spot-201606172115 commit=e28cd4d0a223e1bcea616326e2281900e7e7e9a2 BOOT_IMAGE=/pkg/linux/i386-randconfig-b0-06172203/gcc-6/e28cd4d0a223e1bcea616326e2281900e7e7e9a2/vmlinuz-4.7.0-rc2-00564-ge28cd4d max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-wsx03-yocto-i386/yocto-minimal-i386.cgz/i386-randconfig-b0-06172203/gcc-6/e28cd4d0a223e1bcea616326e2281900e7e7e9a2/0 LKP_SERVER=inn earlyprintk=ttyS0,115200 systemd.log_level=err debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 console=ttyS0,115200 console=tty0 vga=normal rw ip=::::vm-lkp-wsx03-yocto-i386-2::dhcp drbd.minor_count=8' -initrd /fs/sdc1/initrd-vm-lkp-wsx03-yocto-i386-2 -m 320 -smp 1 -device e1000,netdev=net0 -netdev user,id=net0 -boot order=nc -no-reboot -watchdog i6300esb -rtc base=localtime -drive file=/fs/sdc1/disk0-vm-lkp-wsx03-yocto-i386-2,media=disk,if=virtio -pidfile /dev/shm/kboot/pid-vm-lkp-wsx03-yocto-i386-2 -serial file:/dev/shm/kboot/serial-vm-lkp-wsx03-yocto-i386-2 -daemonize -display none -monitor null
Thanks, Kernel Test Robot
On Sat, Jun 18, 2016 at 05:24:30AM +0800, kernel test robot wrote:
FYI, we noticed the following commit:
git://anongit.freedesktop.org/drm-intel topic/drm-misc commit e28cd4d0a223e1bcea616326e2281900e7e7e9a2 ("drm: Automatically register/unregister all connectors")
on test machine: vm-lkp-wsx03-yocto-i386: 1 threads qemu-system-i386 -enable-kvm with 320M memory
caused below changes:
So one driver skips drm_mode_config_init() and so drm_connector_register_all() dies on the mutex_lock().
Maybe
if (list_empty_safe(&dev->mode_config.connector_list)) return;
or we could add a boolean to indicate an active mode_config? -Chris
On Sat, Jun 18, 2016 at 12:19 AM, Chris Wilson chris@chris-wilson.co.uk wrote:
On Sat, Jun 18, 2016 at 05:24:30AM +0800, kernel test robot wrote:
FYI, we noticed the following commit:
git://anongit.freedesktop.org/drm-intel topic/drm-misc commit e28cd4d0a223e1bcea616326e2281900e7e7e9a2 ("drm: Automatically register/unregister all connectors")
on test machine: vm-lkp-wsx03-yocto-i386: 1 threads qemu-system-i386 -enable-kvm with 320M memory
caused below changes:
So one driver skips drm_mode_config_init() and so drm_connector_register_all() dies on the mutex_lock().
Maybe
if (list_empty_safe(&dev->mode_config.connector_list)) return;
or we could add a boolean to indicate an active mode_config?
list_empty_safe seems to be the simplest solution, I'd go with that one. -Daniel
On Sat, Jun 18, 2016 at 05:24:30AM +0800, kernel test robot wrote:
[ 1.338384] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 1.340531] toshiba: not a supported Toshiba laptop [ 1.341126] [drm] Initialized drm 1.1.0 20060810 [ 1.342029] INFO: trying to register non-static key. [ 1.342535] the code is fine but needs lockdep annotation. [ 1.343074] turning off the locking correctness validator. [ 1.343610] CPU: 0 PID: 1 Comm: swapper Not tainted 4.7.0-rc2-00564-ge28cd4d #1 [ 1.344330] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014 [ 1.345192] 00000000 00000000 d28dbdc8 c12a197b d28dbe04 c1058c18 c16986b2 c169870c [ 1.346063] c16986e2 c14e3fdc 00000000 00000000 d28dbdf0 c1027c67 00000000 00000000 [ 1.346917] d39e8b24 00000001 00000000 d28dbe74 c105b796 c14e3fdc c1af7ee4 c1af7ee4 [ 1.347772] Call Trace: [ 1.348031] [<c12a197b>] dump_stack+0x16/0x18 [ 1.348450] [<c1058c18>] register_lock_class+0x164/0x3d1 [ 1.348985] [<c1027c67>] ? kvm_sched_clock_read+0x9/0x18 [ 1.349509] [<c105b796>] __lock_acquire+0x95/0x13c4 [ 1.350007] [<c105c7d3>] ? __lock_acquire+0x10d2/0x13c4 [ 1.350530] [<c10588a5>] ? __lock_is_held+0x24/0x43 [ 1.351029] [<c105cdac>] lock_acquire+0x59/0x77 [ 1.351477] [<c1361cf9>] ? drm_connector_register_all+0x1a/0x92 [ 1.352053] [<c14db8db>] mutex_lock_nested+0x4d/0x2c3 [ 1.352554] [<c1361cf9>] ? drm_connector_register_all+0x1a/0x92 [ 1.353140] [<c1361cf9>] ? drm_connector_register_all+0x1a/0x92 [ 1.353720] [<c105b4bf>] ? trace_hardirqs_on+0xb/0xd [ 1.354239] [<c1361cf9>] drm_connector_register_all+0x1a/0x92 [ 1.354845] [<c10b25be>] ? kstrdup+0x25/0x3a [ 1.355271] [<c135e37d>] drm_dev_register+0x59/0x99 [ 1.355781] [<c195ea3e>] vgem_init+0x34/0x49 [ 1.356213] [<c195ea0a>] ? mipi_dsi_bus_init+0xf/0xf [ 1.356702] [<c100048f>] do_one_initcall+0x7c/0xfd [ 1.357182] [<c104b409>] ? parse_args+0x1fd/0x314 [ 1.357648] [<c1939c10>] ? kernel_init_freeable+0xd0/0x179 [ 1.358203] [<c1939c2c>] kernel_init_freeable+0xec/0x179 [ 1.358763] [<c14d66ea>] kernel_init+0x8/0xcb [ 1.359222] [<c14debce>] ret_from_kernel_thread+0xe/0x30 [ 1.359744] [<c14d66e2>] ? rest_init+0x10e/0x10e
Fwiw, I'm looking at polishing up dmabuf support for vGEM and adding a couple of basic tests using vGEM to BAT. My goal being for testing PRIME import/fencing within i915. -Chris
dri-devel@lists.freedesktop.org