FYI, we noticed the following commit (built with gcc-7):
commit: a3232987fdbf0bede92a9d7c7e2db99a5084d31b ("drm/bochs: Convert bochs driver to
|struct drm_gem_vram_object|")
git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
in testcase: locktorture
with following parameters:
runtime: 300s
test: default
test-description: This torture test consists of creating a number of kernel threads which
acquire the lock and hold it for specific amount of time, thus simulating different
critical region behaviors.
test-url:
https://www.kernel.org/doc/Documentation/locking/locktorture.txt
on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 2G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
+-----------------------------------------------------------------------------+--------+--------+
| | error: |
error: |
+-----------------------------------------------------------------------------+--------+--------+
| boot_successes | 16 | 0
|
| boot_failures | 0 |
16 |
| WARNING:at_drivers/gpu/drm/ttm/ttm_bo.c:#ttm_bo_validate[ttm] | 0 |
16 |
| RIP:ttm_bo_validate[ttm] | 0 |
16 |
| WARNING:at_drivers/dma-buf/reservation.c:#reservation_object_reserve_shared | 0 |
16 |
| RIP:reservation_object_reserve_shared | 0 |
16 |
| WARNING:suspicious_RCU_usage | 0 |
16 |
| include/linux/reservation.h:#suspicious_rcu_dereference_protected()usage | 0 |
16 |
| WARNING:at_drivers/dma-buf/reservation.c:#reservation_object_add_excl_fence | 0 |
16 |
| RIP:reservation_object_add_excl_fence | 0 |
16 |
+-----------------------------------------------------------------------------+--------+--------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <lkp(a)intel.com>
[ 9.999183] WARNING: CPU: 1 PID: 351 at drivers/gpu/drm/ttm/ttm_bo.c:1161
ttm_bo_validate+0x41/0x141 [ttm]
[ 10.000494] Modules linked in: crct10dif_pclmul(+) bochs_drm(+) crc32c_intel
drm_vram_helper ttm ghash_clmulni_intel drm_kms_helper drm parport_pc
drm_panel_orientation_quirks fb_sys_fops syscopyarea sysfillrect psmouse sysimgblt
cfbfillrect cfbimgblt cfbcopyarea fb i2c_piix4(+) fbdev virtio_pci(+) i2c_core parport
button
[ 10.003662] CPU: 1 PID: 351 Comm: systemd-udevd Tainted: G T
5.1.0-rc5-01639-ga3232987 #23
[ 10.004734] RIP: 0010:ttm_bo_validate+0x41/0x141 [ttm]
[ 10.005322] Code: 00 00 00 48 89 44 24 70 31 c0 83 3d 8e 92 4f e2 00 74 19 48 8b 87 00
02 00 00 83 ce ff 48 8d 78 70 e8 2e 39 ed e0 85 c0 75 02 <0f> 0b 48 8d 73 30 4c 89
e7 48 8d 54 24 0c e8 25 e4 ff ff 84 c0 0f
[ 10.007416] RSP: 0018:ffffc900006d3928 EFLAGS: 00010246
[ 10.008004] RAX: 0000000000000000 RBX: ffff88807d60b238 RCX: 0000000000000000
[ 10.008805] RDX: 0000000000000246 RSI: ffff88807d60b4b0 RDI: ffff88807e9263b8
[ 10.009607] RBP: ffffc900006d39c0 R08: 00000000de9be681 R09: 0000000000000004
[ 10.010406] R10: 0000000000000000 R11: ffff88807daac838 R12: ffff88807d60b5f8
[ 10.011208] R13: 0000000000000300 R14: 0000000000000400 R15: 0000000034325258
[ 10.012007] FS: 00007f35dce728c0(0000) GS:ffff888075400000(0000)
knlGS:0000000000000000
[ 10.013787] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
LKP: HOSTNAME vm
[ 10.015669] ? kvm_sched_clock_read+0x5/0xd
[ 10.016157] ? get_lock_stats+0x11/0x3f
[ 10.016607] drm_gem_vram_pin+0x77/0xa2 [drm_vram_helper]
[ 10.017229] drm_gem_vram_driver_gem_prime_vmap+0xe/0x39 [drm_vram_helper]
[ 10.018015] drm_gem_vmap+0x36/0x43 [drm]
[ 10.018491] drm_client_framebuffer_create+0xc6/0x1ca [drm]
[ 10.019143] drm_fb_helper_generic_probe+0x4c/0x157 [drm_kms_helper]
[ 10.019864] __drm_fb_helper_initial_config_and_unlock+0x307/0x442 [drm_kms_helper]
[ 10.020739] drm_fbdev_client_hotplug+0xc8/0x115 [drm_kms_helper]
[ 10.021442] drm_fbdev_generic_setup+0xc4/0xf1 [drm_kms_helper]
[ 10.022120] bochs_pci_probe+0x123/0x143 [bochs_drm]
[ 10.022688] local_pci_probe+0x34/0x75
[ 10.023127] pci_device_probe+0xf8/0x150
[ 10.023585] really_probe+0x199/0x360
[ 10.024009] driver_probe_device+0xcf/0xff
[ 10.024483] device_driver_attach+0x38/0x4f
[ 10.024964] __driver_attach+0x105/0x10d
[ 10.032000] ? device_driver_attach+0x4f/0x4f
[ 10.032560] bus_for_each_dev+0x6c/0x9e
[ 10.033006] bus_add_driver+0x125/0x1d4
[ 10.033454] ? 0xffffffffa024e000
[ 10.033839] driver_register+0x94/0xc6
[ 10.034279] ? 0xffffffffa024e000
[ 10.034650] do_one_initcall+0x10e/0x297
[ 10.035091] ? rcu_read_lock_sched_held+0x58/0x5e
[ 10.035638] ? kmem_cache_alloc_trace+0x21b/0x25b
[ 10.036184] do_init_module+0x59/0x491
[ 10.036616] load_module+0x1178/0x138a
[ 10.037040] ? vfs_read+0x115/0x121
[ 10.037456] ? __se_sys_finit_module+0xaf/0xd5
[ 10.037966] __se_sys_finit_module+0xaf/0xd5
[ 10.038468] do_syscall_64+0x78/0x188
[ 10.038893] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 10.039471] RIP: 0033:0x7f35dbcef229
[ 10.039871] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01
c3 48 8b 0d 3f 4c 2b 00 f7 d8 64 89 01 48
[ 10.047091] RSP: 002b:00007ffef4fddd48 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[ 10.048100] RAX: ffffffffffffffda RBX: 0000561f5bb7db80 RCX: 00007f35dbcef229
[ 10.048957] RDX: 0000000000000000 RSI: 00007f35dc608265 RDI: 000000000000001d
[ 10.050498] RBP: 00007f35dc608265 R08: 0000000000000000 R09: 00007ffef4fde2c0
[ 10.051303] R10: 000000000000001d R11: 0000000000000246 R12: 0000000000000000
[ 10.052106] R13: 0000561f5bb70d70 R14: 0000000000020000 R15: 0000561f5bb40cbc
[ 10.052917] irq event stamp: 22742
[ 10.053315] hardirqs last enabled at (22741): [<ffffffff811ad400>]
kmem_cache_alloc_trace+0x133/0x25b
[ 10.054358] hardirqs last disabled at (22742): [<ffffffff81001621>]
trace_hardirqs_off_thunk+0x1a/0x1c
[ 10.055402] softirqs last enabled at (22728): [<ffffffff81c003cf>]
__do_softirq+0x3cf/0x411
[ 10.056350] softirqs last disabled at (22721): [<ffffffff8107de91>]
irq_exit+0x66/0xe1
[ 10.057251] ---[ end trace c03d531d529a8736 ]---
To reproduce:
# build kernel
cd linux
cp config-5.1.0-rc5-01639-ga3232987 .config
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 modules_prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 SHELL=/bin/bash
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 bzImage
git clone
https://github.com/intel/lkp-tests.git
cd lkp-tests
find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz
bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached in
this email
Thanks,
lkp