FYI, we noticed the following commit:
commit: 75f6dfe3e652e1adef8cc1b073c89f3e22103a8f ("drm: Deduplicate driver initialization message") git://anongit.freedesktop.org/drm-intel drm-intel-nightly
in testcase: trinity with following parameters:
runtime: 300s
test-description: Trinity is a linux system call fuzz tester. test-url: http://codemonkey.org.uk/projects/trinity/
on test machine: qemu-system-x86_64 -enable-kvm -m 320M
caused below changes:
+------------------------------------------+------------+------------+ | | e82dfa00da | 75f6dfe3e6 | +------------------------------------------+------------+------------+ | boot_successes | 8 | 0 | | boot_failures | 0 | 8 | | BUG:unable_to_handle_kernel | 0 | 8 | | Oops:#[##] | 0 | 8 | | EIP_is_at_drm_dev_register | 0 | 8 | | calltrace:vgem_init | 0 | 8 | | Kernel_panic-not_syncing:Fatal_exception | 0 | 8 | +------------------------------------------+------------+------------+
[ 1.608985] mwave: mwavedd::mwave_init: Error: Failed to initialize [ 1.609295] Hangcheck: starting hangcheck timer 0.9.1 (tick is 180 seconds, margin is 60 seconds). [ 1.609913] [drm] radeon kernel modesetting enabled. [ 1.610407] BUG: unable to handle kernel NULL pointer dereference at 0000002c [ 1.610833] IP: [<8143c0ba>] drm_dev_register+0xe9/0x173 [ 1.611131] *pdpt = 0000000000000000 *pde = f000ff53f000ff53 [ 1.611427] [ 1.611513] Oops: 0000 [#1] [ 1.611656] CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.0-rc8-01743-g75f6dfe #354 [ 1.612026] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 [ 1.612523] task: 9342d000 task.stack: 9343e000 [ 1.612749] EIP: 0060:[<8143c0ba>] EFLAGS: 00210246 CPU: 0 [ 1.613023] EIP is at drm_dev_register+0xe9/0x173 [ 1.613257] EAX: 900a3400 EBX: 900a5000 ECX: 00000000 EDX: 00000000 [ 1.613617] ESI: 820233c0 EDI: 00000000 EBP: 9343ff10 ESP: 9343fef8 [ 1.613989] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 [ 1.614278] CR0: 80050033 CR2: 0000002c CR3: 0217e000 CR4: 000006b0 [ 1.614621] Stack: [ 1.614725] 00000000 00000000 8143c57d dd700876 82100b64 000003a3 9343ff20 82100ba4 [ 1.615162] 34c27b4d 82100b64 9343ff80 820b7212 939b87ac 81e79ff0 00000000 9343ff00 [ 1.615595] 81049d1c 00000000 81e79ff0 00060006 81e75748 000003a3 939b87ad 00000200 [ 1.616052] Call Trace: [ 1.616190] [<8143c57d>] ? drm_dev_alloc+0x28/0x43 [ 1.616435] [<82100b64>] ? vmwgfx_init+0x65/0x65 [ 1.616669] [<82100ba4>] vgem_init+0x40/0x74 [ 1.616905] [<82100b64>] ? vmwgfx_init+0x65/0x65 [ 1.617148] [<820b7212>] do_one_initcall+0x9e/0x17a [ 1.617411] [<81049d1c>] ? parse_args+0x1bb/0x27e [ 1.617682] [<820b7452>] ? kernel_init_freeable+0x164/0x266 [ 1.617997] [<820b7481>] kernel_init_freeable+0x193/0x266 [ 1.618287] [<8198706a>] ? rest_init+0xa2/0xa2 [ 1.618521] [<81987072>] kernel_init+0x8/0xcb [ 1.618758] [<8198bc77>] ret_from_fork+0x1b/0x28 [ 1.618994] Code: 68 eb aa 8b 55 e8 89 d8 ff d1 85 c0 89 c7 75 59 8b 43 14 f6 80 dd 00 00 00 20 74 07 89 d8 e8 b1 10 01 00 8b 43 20 8b 53 10 8b 08 <8b> 42 2c 85 c0 75 03 8b 42 08 51 50 ff b6 d8 00 00 00 ff b6 cc [ 1.620399] EIP: [<8143c0ba>] [ 1.620566] drm_dev_register+0xe9/0x173 [ 1.620781] SS:ESP 0068:9343fef8 [ 1.620975] CR2: 000000000000002c [ 1.621149] ---[ end trace 9d22d41231e36593 ]--- [ 1.621389] Kernel panic - not syncing: Fatal exception [ 1.621680] Kernel Offset: disabled
Elapsed time: 10
To reproduce:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/wfg/lkp-tests.git cd lkp-tests bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email
Thanks, Xiaolong
kernel test robot xiaolong.ye@intel.com writes:
on test machine: qemu-system-x86_64 -enable-kvm -m 320M
caused below changes:
[ 1.608985] mwave: mwavedd::mwave_init: Error: Failed to initialize [ 1.609295] Hangcheck: starting hangcheck timer 0.9.1 (tick is 180 seconds, margin is 60 seconds). [ 1.609913] [drm] radeon kernel modesetting enabled. [ 1.610407] BUG: unable to handle kernel NULL pointer dereference at 0000002c [ 1.610833] IP: [<8143c0ba>] drm_dev_register+0xe9/0x173 [ 1.611131] *pdpt = 0000000000000000 *pde = f000ff53f000ff53 [ 1.611427]
I believe this is already fixed by 6098909cf2d0 ("drm: Avoid NULL dereference of drm_device.dev"). But right now the tip of the drm-intel-nightly already includes that patch, so I'm not sure if the test included it, I think not.
I gave it a try with the jobfile just to be sure on top of drm-misc-next, and I couldn't reproduce the error anymore after applying Chris' patch (but I could reproduce the Oops when trying only with my patch).
Also, sorry for the noise and lesson learned about virtual devices :(
dri-devel@lists.freedesktop.org