DMA fence overflow on alt tab out of and back into Deathloop
The bug check appears to be crashing on this line:
BUG_ON(fobj->num_fences >= fobj->max_fences);
dmesg log of the bug check:
[ 1159.590102] ------------[ cut here ]------------
[ 1159.590111] kernel BUG at drivers/dma-buf/dma-resv.c:312!
[ 1159.590128] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
[ 1159.590136] CPU: 4 PID: 4336 Comm: easyeffects Tainted: G OE 6.4.0-1-drm-xe-next-git-g22bed6ae7f55-dirty #1 8c36d2bd7c32c03c9a861457957d6edd01c9c897
[ 1159.590145] Hardware name: Micro-Star International Co., Ltd MS-7C02/B450 TOMAHAWK (MS-7C02), BIOS 1.J1 05/06/2023
[ 1159.590149] RIP: 0010:dma_resv_add_fence+0x1ce/0x1e0
[ 1159.590162] Code: 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f e9 7a d4 ff ff 48 83 c4 08 be 03 00 00 00 5b 5d 41 5c 41 5d 41 5e 41 5f e9 12 f0 ca ff <0f> 0b 31 c0 31 ed e9 7c ff ff ff 0f 1f 80 00 00 00 00 90 90 90 90
[ 1159.590167] RSP: 0018:ffffa98091c4f978 EFLAGS: 00010246
[ 1159.590174] RAX: 0000000000000005 RBX: ffff9dc744b4c700 RCX: 0000000000000005
[ 1159.590178] RDX: 0000000000000003 RSI: ffff9dc706b1d0c0 RDI: ffff9dc706b1d0f8
[ 1159.590182] RBP: 0000000000000005 R08: 0000000000000037 R09: 0000000000000228
[ 1159.590185] R10: 0000000000000001 R11: 0000000000000000 R12: ffff9dc744b4c703
[ 1159.590188] R13: 0000000000000004 R14: ffff9dc706b1d0c0 R15: ffff9dc726852600
[ 1159.590192] FS: 00007fd434703040(0000) GS:ffff9dcc5eb00000(0000) knlGS:0000000000000000
[ 1159.590196] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1159.590200] CR2: 00007ff712ff7000 CR3: 0000000270528000 CR4: 00000000003506e0
[ 1159.590204] Call Trace:
[ 1159.590209] <TASK>
[ 1159.590215] ? die+0x36/0x90
[ 1159.590226] ? do_trap+0xda/0x100
[ 1159.590235] ? dma_resv_add_fence+0x1ce/0x1e0
[ 1159.590241] ? do_error_trap+0x6a/0x90
[ 1159.590246] ? dma_resv_add_fence+0x1ce/0x1e0
[ 1159.590252] ? exc_invalid_op+0x50/0x70
[ 1159.590261] ? dma_resv_add_fence+0x1ce/0x1e0
[ 1159.590266] ? asm_exc_invalid_op+0x1a/0x20
[ 1159.590279] ? dma_resv_add_fence+0x1ce/0x1e0
[ 1159.590290] xe_exec_ioctl+0xa5d/0xb80 [xe 8fe5314c68a87a66e2a15bc6592bc7ecffe18d2c]
[ 1159.590540] ? __pfx_xe_exec_ioctl+0x10/0x10 [xe 8fe5314c68a87a66e2a15bc6592bc7ecffe18d2c]
[ 1159.590751] drm_ioctl_kernel+0xca/0x170
[ 1159.590759] drm_ioctl+0x26d/0x4b0
[ 1159.590765] ? __pfx_xe_exec_ioctl+0x10/0x10 [xe 8fe5314c68a87a66e2a15bc6592bc7ecffe18d2c]
[ 1159.590977] __x64_sys_ioctl+0x91/0xd0
[ 1159.590985] do_syscall_64+0x5d/0x90
[ 1159.590993] ? __x64_sys_ioctl+0xac/0xd0
[ 1159.590997] ? syscall_exit_to_user_mode+0x1b/0x40
[ 1159.591004] ? do_syscall_64+0x6c/0x90
[ 1159.591009] ? exc_page_fault+0x7f/0x180
[ 1159.591015] entry_SYSCALL_64_after_hwframe+0x72/0xdc
[ 1159.591022] RIP: 0033:0x7fd43591576f
[ 1159.591070] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 18 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[ 1159.591074] RSP: 002b:00007ffd0d9ee360 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 1159.591080] RAX: ffffffffffffffda RBX: 000055a924fcd16c RCX: 00007fd43591576f
[ 1159.591083] RDX: 00007ffd0d9ee400 RSI: 0000000040386448 RDI: 000000000000004b
[ 1159.591086] RBP: 000000000000004b R08: 00000000000000d0 R09: 0000000000000001
[ 1159.591089] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd0d9ee400
[ 1159.591092] R13: 000055a927490b80 R14: 000055a927490b80 R15: 000055a9250a6a80
[ 1159.591098] </TASK>
[ 1159.591100] Modules linked in: snd_seq_dummy snd_hrtimer snd_seq xt_mark vhost_net vhost vhost_iotlb tap xt_nat xt_tcpudp veth xt_conntrack xt_MASQUERADE nf_conntrack_netlink xt_addrtype br_netfilter tun nf_tables nfnetlink ip6table_nat ip6table_filter ip6_tables iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_filter cmac algif_hash algif_skcipher af_alg bnep nct6775 nct6775_core hwmon_vid overlay btusb btrtl btbcm btintel btmtk bluetooth hid_apple apple_mfi_fastcharge ecdh_generic hid_logitech_hidpp mousedev snd_hda_codec_hdmi bridge stp llc cfg80211 xe snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio intel_rapl_msr uvcvideo snd_hda_intel intel_rapl_common videobuf2_vmalloc drm_buddy snd_intel_dspcfg uvc gpu_sched snd_intel_sdw_acpi edac_mce_amd videobuf2_memops i2c_algo_bit snd_usb_audio snd_hda_codec videobuf2_v4l2 drm_suballoc_helper kvm_amd snd_usbmidi_lib drm_ttm_helper videodev snd_rawmidi ttm snd_hda_core snd_seq_device videobuf2_common kvm snd_hwdep drm_display_helper snd_pcm
[ 1159.591207] irqbypass mc joydev rfkill cec snd_timer wmi_bmof snd acpi_cpufreq rapl video pcspkr k10temp i2c_piix4 soundcore gpio_amdpt gpio_generic mac_hid hid_logitech_dj uinput i2c_dev loop fuse vfat fat ip_tables x_tables usbhid ext4 crc16 mbcache jbd2 crct10dif_pclmul crc32_pclmul polyval_clmulni polyval_generic r8169 gf128mul ghash_clmulni_intel sha512_ssse3 aesni_intel crypto_simd realtek nvme cryptd ccp mdio_devres sp5100_tco xhci_pci nvme_core sr_mod libphy cdrom nvme_common xhci_pci_renesas wmi btrfs blake2b_generic xor raid6_pq libcrc32c crc32c_generic crc32c_intel dm_mirror dm_region_hash dm_log pkcs8_key_parser sg dm_multipath vhba(OE) crypto_user dm_mod
[ 1159.591545] ---[ end trace 0000000000000000 ]---
[ 1159.591550] RIP: 0010:dma_resv_add_fence+0x1ce/0x1e0
[ 1159.591599] Code: 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f e9 7a d4 ff ff 48 83 c4 08 be 03 00 00 00 5b 5d 41 5c 41 5d 41 5e 41 5f e9 12 f0 ca ff <0f> 0b 31 c0 31 ed e9 7c ff ff ff 0f 1f 80 00 00 00 00 90 90 90 90
[ 1159.591603] RSP: 0018:ffffa98091c4f978 EFLAGS: 00010246
[ 1159.591608] RAX: 0000000000000005 RBX: ffff9dc744b4c700 RCX: 0000000000000005
[ 1159.591611] RDX: 0000000000000003 RSI: ffff9dc706b1d0c0 RDI: ffff9dc706b1d0f8
[ 1159.591614] RBP: 0000000000000005 R08: 0000000000000037 R09: 0000000000000228
[ 1159.591617] R10: 0000000000000001 R11: 0000000000000000 R12: ffff9dc744b4c703
[ 1159.591620] R13: 0000000000000004 R14: ffff9dc706b1d0c0 R15: ffff9dc726852600
[ 1159.591624] FS: 00007fd434703040(0000) GS:ffff9dcc5eb00000(0000) knlGS:0000000000000000
[ 1159.591629] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1159.591633] CR2: 00007ff712ff7000 CR3: 0000000270528000 CR4: 00000000003506e0