evdi: Crash in dma-buf on kernel 5.14 (and possibly 5.11/5.12/5.13, can't confirm)

  • Are you using the latest driver? Yes

  • Are you using the latest EVDI version? Yes. Tried both the version bundled with DLM and a pull from the devel branch.

  • If you are using a DisplayLink device, have you checked ‘troubleshooting’ on DisplayLink’s website? Yes

  • Is this issue related to evdi/kernel? Yes

  • Linux distribution and its version Debian Bookworm

  • Linux kernel version 5.14.0-1 (5.14.6)

  • Xorg version (if used) 1.20.11

  • Desktop environment in use XFCE 4.16.1

  • Trigger: Happens when unplugging, resizing, or repositioning a DisplayLink device. Initial connection + mirror works fine.

  • Trace logs: (hopefully not too long)

kernel: ------------[ cut here ]------------
kernel: kernel BUG at drivers/dma-buf/dma-buf.c:1336!
kernel: invalid opcode: 0000 [#1] SMP PTI
kernel: CPU: 6 PID: 1077 Comm: Xorg Tainted: P          IOE     5.14.0-1-amd64 #1  Debian 5.14.6-2
kernel: Hardware name: LENOVO 20217/20217, BIOS 74CN35WW(V1.10) 07/18/2013
kernel: RIP: 0010:dma_buf_vunmap+0x7a/0x90
kernel: Code: 0b 48 89 ee 48 89 df e8 d4 4f 59 00 80 7b 58 00 48 c7 43 50 00 00 00 00 74 04 c6 43 58 00 5b 4c 89 e7 5d 41 5c e9 d6 db 29 00 <0f> 0b 0f 0b c3 0f 0b >
kernel: RSP: 0018:ffffbc1580f2bb40 EFLAGS: 00010202
kernel: RAX: ffffbc1585001000 RBX: ffff917d49bcb800 RCX: 0000000000000000
kernel: RDX: 0000000000000000 RSI: ffffbc1580f2bb60 RDI: ffff917d49bcb800
kernel: RBP: ffffbc1580f2bb60 R08: ffff917d433e6e18 R09: ffff917d40e901f8
kernel: R10: 0000000000000000 R11: ffff917d41a83d98 R12: ffff917d4984ea00
kernel: R13: ffff917d58c24c00 R14: ffff917d58c24b40 R15: 0000000000000000
kernel: FS:  00007f85aedcba40(0000) GS:ffff917ea6f80000(0000) knlGS:0000000000000000
kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: 00007f859f02c000 CR3: 00000001197a8006 CR4: 00000000001706e0
kernel: Call Trace:
kernel:  evdi_gem_vunmap+0xae/0xc0 [evdi]
kernel:  ? drm_mode_object_register+0x10/0x40 [drm]
kernel:  evdi_gem_free_object+0x18/0xb0 [evdi]
kernel:  evdi_user_framebuffer_destroy+0x4a/0x60 [evdi]
kernel:  evdi_plane_atomic_update+0xd7/0x270 [evdi]
kernel:  ? __cond_resched+0x16/0x40
kernel:  drm_atomic_helper_commit_planes+0xc2/0x250 [drm_kms_helper]
kernel:  drm_atomic_helper_commit_tail+0x42/0x80 [drm_kms_helper]
kernel:  commit_tail+0xce/0x130 [drm_kms_helper]
kernel:  drm_atomic_helper_commit+0x113/0x140 [drm_kms_helper]
kernel:  drm_atomic_helper_set_config+0x70/0xb0 [drm_kms_helper]
kernel:  drm_mode_setcrtc+0x1d3/0x6d0 [drm]
kernel:  ? drm_mode_getcrtc+0x180/0x180 [drm]
kernel:  drm_ioctl_kernel+0xaa/0xf0 [drm]
kernel:  drm_ioctl+0x220/0x3c0 [drm]
kernel:  ? drm_mode_getcrtc+0x180/0x180 [drm]
kernel:  __x64_sys_ioctl+0x83/0xb0
kernel:  do_syscall_64+0x3b/0xc0
kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xae
kernel: RIP: 0033:0x7f85af237957
kernel: Code: 3c 1c 48 f7 d8 4c 39 e0 77 b9 e8 24 ff ff ff 85 c0 78 be 4c 89 e0 5b 5d 41 5c c3 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 >
kernel: RSP: 002b:00007ffecf16f688 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
kernel: RAX: ffffffffffffffda RBX: 00007ffecf16f6c0 RCX: 00007f85af237957
kernel: RDX: 00007ffecf16f6c0 RSI: 00000000c06864a2 RDI: 0000000000000015
kernel: RBP: 00000000c06864a2 R08: 0000000000000000 R09: 00005578eb04df20
kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 00005578ea703ef0
kernel: R13: 0000000000000015 R14: 00005578ea6f5a68 R15: 0000000000000001
kernel: Modules linked in: vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) rfcomm hid_logitech_hidpp cmac algif_hash algif_skcipher af_alg intel_rapl_msr intel_rapl_comm>
kernel:  mei_me watchdog mei ideapad_laptop nvidia_drm(POE) platform_profile sparse_keymap rfkill ac evdev nvidia_modeset(POE) nvidia(POE) ipmi_devintf ipmi_msghan>
kernel: ---[ end trace 06292ed45b30dd9e ]---
  • Other possibly useful info Kernel version 5.10.0-8 (5.10.46) works fine. I don’t have copies of 5.11/5.12/5.13 to test with.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 17

Most upvoted comments

This was fixed in eb1ff68 and is part of 1.10.0/the upstream beta release. Forgot to close when the commit landed.

Salut @mortezaalizadeh that sounds interesting to me. I hope that i can test your changes on my Ryzen Notebook and another (but a bit) older Intel hardware. I noticed on both devices a high CPU consumption that took place inside the kernel, cause itrace did not reportet any activity in the user space.