panic by Xorg on ThinkPad R51e inside drm_pci_alloc, i915_gem_object_get_pages_phys
Hardware: ThinkPad R51 VGA
lspci -nn:
00:02.0 VGA compatible controller [0300]: Intel Corporation 82852/855GM Integrated Grahics Device [8086:3582] (rev 02)
00:02.1 Display controller [0380]: Intel Corporation 82852/855GM Integrated Graphics Device [8086:3582] (rev 02)
Kernel: git://anongit.freedesktop.org/drm-tip 5.5.0-rc7 0b551226df5e (2020/01/23)
Architecture: X86_32 (i386)
Distribution: CentOS 8, i686 rpms
Display: internal LCD (1024x768)
DRM screen resolution switching on boot is working.
After invoking Xorg, the kernel panics as below.
The panic does not contain "BUG" line for unknown reason;
I couldn't find any BUG()s in the codepath.
[ 185.593321] invalid opcode: 0000 [#1] SMP
[ 185.593344] CPU: 0 PID: 1666 Comm: Xorg Not tainted 5.5.0-rc7.el8.i586 #1
[ 185.593348] Hardware name: IBM 2887HEJ/2887HEJ, BIOS 1VET62WW (1.20 ) 12/31/2004
[ 185.593422] EIP: drm_pci_alloc+0x9c/0x120 [drm]
[ 185.593427] Code: e9 1a 8d 14 92 c1 e1 04 8b 89 40 b0 73 c8 83 e1 f0 8d 0c d1 8b 11 81 e2 00 00 01 00 74 10 ba 30 87 e0 f7 89 c8 e8 b4 b1 c0 cf <0f> 0b 66 90 8b 51 04 89 df 83 e2 01 75 e6 83 39 ff 74 61 3e 80 49
[ 185.593431] EAX: 00000000 EBX: 00004000 ECX: c82edbfe EDX: f3b83e88
[ 185.593435] ESI: ed454190 EDI: ec568000 EBP: d00fbb30 ESP: d00fbb24
[ 185.593438] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00210246
[ 185.593442] CR0: 80050033 CR2: 01d973b4 CR3: 28a71000 CR4: 000006d0
[ 185.593444] Call Trace:
[ 185.593580] i915_gem_object_get_pages_phys+0x59/0x260 [i915]
[ 185.593651] ____i915_gem_object_get_pages+0x1f/0x40 [i915]
[ 185.593722] i915_gem_object_attach_phys+0xba/0x170 [i915]
[ 185.593794] intel_plane_pin_fb+0xc5/0xe0 [i915]
[ 185.593866] intel_prepare_plane_fb+0xd7/0x350 [i915]
[ 185.593908] drm_atomic_helper_prepare_planes+0x82/0x120 [drm_kms_helper]
[ 185.593967] ? __i915_sw_fence_init+0x21/0x50 [i915]
[ 185.594039] intel_atomic_commit+0xbc/0x380 [i915]
[ 185.594112] ? intel_atomic_commit_tail+0x1340/0x1340 [i915]
[ 185.594149] drm_atomic_commit+0x3a/0x50 [drm]
[ 185.594168] drm_atomic_helper_update_plane+0xbf/0x130 [drm_kms_helper]
[ 185.594241] intel_legacy_cursor_update+0x84/0x2a0 [i915]
[ 185.594314] ? intel_framebuffer_create+0x60/0x60 [i915]
[ 185.594386] ? intel_unpin_fb_vma+0x80/0x80 [i915]
[ 185.594423] __setplane_atomic+0x9e/0xe0 [drm]
[ 185.594496] ? intel_unpin_fb_vma+0x80/0x80 [i915]
[ 185.594532] drm_mode_cursor_universal+0x14a/0x290 [drm]
[ 185.594572] drm_mode_cursor_common+0xc3/0x220 [drm]
[ 185.594610] ? drm_mode_setplane+0x250/0x250 [drm]
[ 185.594646] drm_mode_cursor_ioctl+0x57/0x70 [drm]
[ 185.594678] drm_ioctl_kernel+0x8f/0xd0 [drm]
[ 185.594709] drm_ioctl+0x21e/0x3c0 [drm]
[ 185.594745] ? drm_mode_setplane+0x250/0x250 [drm]
[ 185.594779] ? drm_version+0x80/0x80 [drm]
[ 185.594788] do_vfs_ioctl+0x9a/0x710
[ 185.594794] ? selinux_file_ioctl+0x156/0x210
[ 185.594800] ? tomoyo_path_chmod+0x20/0x20
[ 185.594804] ? tomoyo_file_ioctl+0x19/0x20
[ 185.594810] ? security_file_ioctl+0x30/0x50
[ 185.594814] ksys_ioctl+0x56/0x80
[ 185.594818] sys_ioctl+0x16/0x20
[ 185.594823] do_fast_syscall_32+0x7a/0x250
[ 185.594830] entry_SYSENTER_32+0xa5/0xf8
[ 185.594834] EIP: 0xb7edbad9
[ 185.594838] Code: 00 89 d3 eb cf 8d 74 26 00 b8 80 96 98 00 eb b5 8b 04 24 c3 8b 1c 24 c3 8b 34 24 c3 8b 3c 24 c3 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90
[ 185.594842] EAX: ffffffda EBX: 0000000c ECX: c01c64a3 EDX: bfe5ec90
[ 185.594845] ESI: 01d97240 EDI: c01c64a3 EBP: 0000000c ESP: bfe5ec08
[ 185.594849] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00200292
[ 185.594853] Modules linked in: libfc scsi_transport_fc rfkill zram sg joydev lpc_ich pcspkr i2c_i801 parport_pc parport acpi_cpufreq ext4 mbcache jbd2 loop nls_utf8 isofs 8021q garp mrp stp llc i915 sr_mod sd_mod cdrom ata_generic cec i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm ata_piix libata firewire_ohci firewire_core e1000 yenta_socket serio_raw crc_itu_t video sunrpc xts lrw dm_crypt dm_round_robin dm_multipath dm_snapshot dm_bufio dm_mirror dm_region_hash dm_log dm_zero dm_mod linear raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 iscsi_ibft squashfs cramfs be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb4i cxgb4 libcxgbi libcxgb iscsi_tcp libiscsi_tcp libiscsi edd scsi_transport_iscsi
[ 185.594970] ---[ end trace c0be11b0d9308200 ]---
[ 185.595002] EIP: drm_pci_alloc+0x9c/0x120 [drm]
[ 185.595006] Code: e9 1a 8d 14 92 c1 e1 04 8b 89 40 b0 73 c8 83 e1 f0 8d 0c d1 8b 11 81 e2 00 00 01 00 74 10 ba 30 87 e0 f7 89 c8 e8 b4 b1 c0 cf <0f> 0b 66 90 8b 51 04 89 df 83 e2 01 75 e6 83 39 ff 74 61 3e 80 49
[ 185.595010] EAX: 00000000 EBX: 00004000 ECX: c82edbfe EDX: f3b83e88
[ 185.595013] ESI: ed454190 EDI: ec568000 EBP: d00fbb30 ESP: d00fbb24
[ 185.595017] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00210246
[ 185.595020] CR0: 80050033 CR2: 01d973b4 CR3: 28a71000 CR4: 000006d0
[ 185.595024] Kernel panic - not syncing: Fatal exception
[ 185.595031] Kernel Offset: 0x6800000 from 0xc1000000 (relocation range: 0xc0000000-0xf77fdfff)
[ 185.595035] ---
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Author
This may not be very useful, but the disassembly of drm_pci_alloc() looks like this: env LANG=C objdump -d -S drivers/gpu/drm/drm_pci.o drivers/gpu/drm/drm_pci.o: file format elf32-i386 Disassembly of section .text: 00000000 <drm_pci_alloc>: * * Return: A handle to the allocated memory block on success or NULL on * failure. */ drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t align) { 0: e8 fc ff ff ff call 1 <drm_pci_alloc+0x1> 5: 55 push %ebp 6: 89 e5 mov %esp,%ebp 8: 57 push %edi 9: 56 push %esi a: 53 push %ebx /* pci_alloc_consistent only guarantees alignment to the smallest * PAGE_SIZE order which is greater than or equal to the requested size. * Return NULL here for now to make sure nobody tries for larger alignment */ if (align > size) b: 39 d1 cmp %edx,%ecx d: 0f 87 ed 00 00 00 ja 100 <drm_pci_alloc+0x100> 13: 89 c7 mov %eax,%edi index = kmalloc_index(size); if (!index) return ZERO_SIZE_PTR; return kmem_cache_alloc_trace( 15: a1 10 00 00 00 mov 0x10,%eax 1a: 89 d3 mov %edx,%ebx 1c: b9 0c 00 00 00 mov $0xc,%ecx 21: ba c0 0c 00 00 mov $0xcc0,%edx 26: e8 fc ff ff ff call 27 <drm_pci_alloc+0x27> 2b: 89 c6 mov %eax,%esi return NULL; dmah = kmalloc(sizeof(drm_dma_handle_t), GFP_KERNEL); if (!dmah) 2d: 85 c0 test %eax,%eax 2f: 0f 84 cb 00 00 00 je 100 <drm_pci_alloc+0x100> return NULL; dmah->size = size; 35: 89 58 08 mov %ebx,0x8(%eax) dmah->vaddr = dma_alloc_coherent(&dev->pdev->dev, size, 38: 8b 87 d4 00 00 00 mov 0xd4(%edi),%eax static inline void *dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp) { return dma_alloc_attrs(dev, size, dma_handle, gfp, 3e: 89 f1 mov %esi,%ecx 40: 89 da mov %ebx,%edx 42: 6a 00 push $0x0 44: 68 c0 0c 04 00 push $0x40cc0 49: 83 c0 74 add $0x74,%eax 4c: e8 fc ff ff ff call 4d <drm_pci_alloc+0x4d> 51: 89 46 04 mov %eax,0x4(%esi) &dmah->busaddr, GFP_KERNEL | __GFP_COMP); if (dmah->vaddr == NULL) { 54: 5a pop %edx 55: 59 pop %ecx 56: 85 c0 test %eax,%eax 58: 0f 84 9a 00 00 00 je f8 <drm_pci_alloc+0xf8> return NULL; } /* XXX - Is virt_to_page() legal for consistent mem? */ /* Reserve */ for (addr = (unsigned long)dmah->vaddr, sz = size; 5e: 85 db test %ebx,%ebx 60: 0f 84 9c 00 00 00 je 102 <drm_pci_alloc+0x102> sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) { SetPageReserved(virt_to_page((void *)addr)); 66: 8d 90 00 00 00 40 lea 0x40000000(%eax),%edx #error Allocator MAX_ORDER exceeds SECTION_SIZE #endif static inline unsigned long pfn_to_section_nr(unsigned long pfn) { return pfn >> PFN_SECTION_SHIFT; 6c: 89 d1 mov %edx,%ecx 6e: c1 ea 0c shr $0xc,%edx 71: c1 e9 1a shr $0x1a,%ecx 74: 8d 14 92 lea (%edx,%edx,4),%edx 77: c1 e1 04 shl $0x4,%ecx #define SECTION_NID_SHIFT 3 static inline struct page *__section_mem_map_addr(struct mem_section *section) { unsigned long map = section->section_mem_map; map &= SECTION_MAP_MASK; 7a: 8b 89 00 00 00 00 mov 0x0(%ecx),%ecx 80: 83 e1 f0 and $0xfffffff0,%ecx 83: 8d 0c d1 lea (%ecx,%edx,8),%ecx } static __always_inline bool constant_test_bit(long nr, const volatile unsigned long *addr) { return ((1UL << (nr & (BITS_PER_LONG-1))) & (addr[nr >> _BITOPS_LONG_SHIFT])) != 0; 86: 8b 11 mov (%ecx),%edx return READ_ONCE(page->compound_head) & 1; } static __always_inline int PageCompound(struct page *page) { return test_bit(PG_head, &page->flags) || PageTail(page); 88: 81 e2 00 00 01 00 and $0x10000,%edx 8e: 74 10 je a0 <drm_pci_alloc+0xa0> PAGEFLAG(SavePinned, savepinned, PF_NO_COMPOUND); PAGEFLAG(Foreign, foreign, PF_NO_COMPOUND); PAGEFLAG(XenRemapped, xen_remapped, PF_NO_COMPOUND) TESTCLEARFLAG(XenRemapped, xen_remapped, PF_NO_COMPOUND) PAGEFLAG(Reserved, reserved, PF_NO_COMPOUND) 90: ba 00 00 00 00 mov $0x0,%edx 95: 89 c8 mov %ecx,%eax 97: e8 fc ff ff ff call 98 <drm_pci_alloc+0x98> 9c: 0f 0b ud2 9e: 66 90 xchg %ax,%ax }) static __always_inline void __read_once_size(const volatile void *p, void *res, int size) { __READ_ONCE_SIZE; a0: 8b 51 04 mov 0x4(%ecx),%edx return test_bit(PG_head, &page->flags) || PageTail(page); a3: 89 df mov %ebx,%edi a5: 83 e2 01 and $0x1,%edx a8: 75 e6 jne 90 <drm_pci_alloc+0x90> PAGEFLAG(Reserved, reserved, PF_NO_COMPOUND) aa: 83 39 ff cmpl $0xffffffff,(%ecx) ad: 74 61 je 110 <drm_pci_alloc+0x110> asm volatile(LOCK_PREFIX "orb %1,%0" af: f0 80 49 01 10 lock orb $0x10,0x1(%ecx) for (addr = (unsigned long)dmah->vaddr, sz = size; b4: 81 ef 00 10 00 00 sub $0x1000,%edi ba: 74 46 je 102 <drm_pci_alloc+0x102> SetPageReserved(virt_to_page((void *)addr)); bc: ba 00 00 00 40 mov $0x40000000,%edx c1: 29 fa sub %edi,%edx c3: 01 da add %ebx,%edx c5: 01 c2 add %eax,%edx return pfn >> PFN_SECTION_SHIFT; c7: 89 d1 mov %edx,%ecx c9: c1 ea 0c shr $0xc,%edx cc: c1 e9 1a shr $0x1a,%ecx cf: 8d 14 92 lea (%edx,%edx,4),%edx d2: c1 e1 04 shl $0x4,%ecx map &= SECTION_MAP_MASK; d5: 8b 89 00 00 00 00 mov 0x0(%ecx),%ecx db: 83 e1 f0 and $0xfffffff0,%ecx de: 8d 0c d1 lea (%ecx,%edx,8),%ecx (addr[nr >> _BITOPS_LONG_SHIFT])) != 0; e1: 8b 11 mov (%ecx),%edx return test_bit(PG_head, &page->flags) || PageTail(page); e3: 81 e2 00 00 01 00 and $0x10000,%edx e9: 75 a5 jne 90 <drm_pci_alloc+0x90> eb: 8b 51 04 mov 0x4(%ecx),%edx ee: 83 e2 01 and $0x1,%edx f1: 75 9d jne 90 <drm_pci_alloc+0x90> f3: eb b5 jmp aa <drm_pci_alloc+0xaa> f5: 8d 76 00 lea 0x0(%esi),%esi kfree(dmah); f8: 89 f0 mov %esi,%eax fa: e8 fc ff ff ff call fb <drm_pci_alloc+0xfb> ff: 90 nop return NULL; 100: 31 f6 xor %esi,%esi } return dmah; } 102: 8d 65 f4 lea -0xc(%ebp),%esp 105: 89 f0 mov %esi,%eax 107: 5b pop %ebx 108: 5e pop %esi 109: 5f pop %edi 10a: 5d pop %ebp 10b: c3 ret 10c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi PAGEFLAG(Reserved, reserved, PF_NO_COMPOUND) 110: ba 28 00 00 00 mov $0x28,%edx 115: 89 c8 mov %ecx,%eax 117: e8 fc ff ff ff call 118 <drm_pci_alloc+0x118> 11c: 0f 0b ud2 11e: 66 90 xchg %ax,%ax
- Chris Wilson added severity::critical label
added severity::critical label
- Reporter
Which is you last working kernel? If you do have the opportunity a bisect would be helpful.
- Author
This machine had been working well with CentOS 7 i686 (kernel-3.10 with 4.4 DRM code), so bisecting will be a long run to go. I'll give a try, but what's a bottom good candidate to start on? This machine was not tested with kernel-5.x series besides the reported 5.5.0-rc7. A similar panic occurs with kernel-4.19.95 LTS kernel, so this seems to be a deep regression: [ 177.736855] page:f2f4b840 count:1 mapcount:0 mapping:00000000 index:0x0 compound_mapcount: 0 [ 177.736884] flags: 0x31008000(head) [ 177.736988] invalid opcode: 0000 [#1] SMP [ 177.736994] CPU: 0 PID: 1618 Comm: Xorg Not tainted 4.19.95-1.el8.i586 #1 [ 177.736997] Hardware name: IBM 2887HEJ/2887HEJ, BIOS 1VET62WW (1.20 ) 12/31/2004 [ 177.737056] EIP: drm_pci_alloc+0x13a/0x1f0 [drm] [ 177.737060] Code: e7 04 8b bf c0 17 e2 c6 83 e7 f8 8d 04 c7 8b 38 81 e7 00 80 00 00 75 08 8b 78 04 83 e7 01 74 b3 ba 20 77 e8 f7 e8 06 07 39 ce <0f> 0b 8d 74 26 00 8d 45 e8 e8 38 7c 1c ce 84 c0 74 06 8b 3f 85 ff [ 177.737065] EAX: 00000000 EBX: edaa0540 ECX: c6a06315 EDX: 00000007 [ 177.737069] ESI: 00004000 EDI: c60d7fa0 EBP: ecb83b30 ESP: ecb83b18 [ 177.737073] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00213246 [ 177.737077] CR0: 80050033 CR2: 00e133a4 CR3: 2d015000 CR4: 000006d0 [ 177.737080] Call Trace: [ 177.737185] i915_gem_object_get_pages_phys+0x59/0x270 [i915] [ 177.737234] ? __i915_gem_object_unset_pages+0x123/0x1a0 [i915] [ 177.737283] ____i915_gem_object_get_pages+0x1f/0x40 [i915] [ 177.737332] i915_gem_object_attach_phys+0xba/0x160 [i915] [ 177.737385] intel_plane_pin_fb+0xa4/0xb0 [i915] [ 177.737438] intel_prepare_plane_fb+0x117/0x2e0 [i915] [ 177.737492] ? intel_crtc_get_vblank_counter+0x40/0x40 [i915] [ 177.737518] drm_atomic_helper_prepare_planes+0x42/0xd0 [drm_kms_helper] [ 177.737561] ? __i915_sw_fence_init+0x21/0x40 [i915] [ 177.737614] intel_atomic_commit+0x97/0x2c0 [i915] [ 177.737668] ? intel_atomic_commit_tail+0xd70/0xd70 [i915] [ 177.737695] drm_atomic_commit+0x3a/0x50 [drm] [ 177.737709] drm_atomic_helper_update_plane+0xbf/0xe0 [drm_kms_helper] [ 177.737763] intel_legacy_cursor_update+0x85/0x320 [i915] [ 177.737817] ? intel_unpin_fb_vma+0x40/0x40 [i915] [ 177.737843] __setplane_atomic+0x9a/0xe0 [drm] [ 177.737896] ? intel_unpin_fb_vma+0x40/0x40 [i915] [ 177.737922] drm_mode_cursor_universal+0x14b/0x290 [drm] [ 177.737951] drm_mode_cursor_common+0xbb/0x200 [drm] [ 177.737978] ? drm_mode_setplane+0x240/0x240 [drm] [ 177.738004] drm_mode_cursor_ioctl+0x57/0x70 [drm] [ 177.738028] drm_ioctl_kernel+0x88/0xd0 [drm] [ 177.738052] drm_ioctl+0x221/0x3d0 [drm] [ 177.738078] ? drm_mode_setplane+0x240/0x240 [drm] [ 177.738128] ? i915_gem_fault+0x217/0x5d0 [i915] [ 177.738138] ? page_trans_huge_mapcount+0x18/0x100 [ 177.738144] ? reuse_swap_page+0x83/0x3a0 [ 177.738150] ? ptep_set_access_flags+0x25/0x30 [ 177.738156] ? do_wp_page+0x137/0x600 [ 177.738179] ? drm_version+0x80/0x80 [drm] [ 177.738184] do_vfs_ioctl+0x9a/0x6d0 [ 177.738190] ? selinux_file_ioctl+0x13b/0x1f0 [ 177.738195] ? selinux_bprm_set_creds+0x2c0/0x2c0 [ 177.738201] ? security_file_ioctl+0x30/0x50 [ 177.738206] ksys_ioctl+0x56/0x80 [ 177.738210] sys_ioctl+0x16/0x20 [ 177.738215] do_fast_syscall_32+0x7f/0x200 [ 177.738222] entry_SYSENTER_32+0x6b/0xbe [ 177.738226] EIP: 0xb7f57d29 [ 177.738230] Code: 08 8b 80 64 cd ff ff 85 d2 74 02 89 02 5d c3 8b 04 24 c3 8b 1c 24 c3 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 [ 177.738235] EAX: ffffffda EBX: 0000000c ECX: c01c64a3 EDX: bfb02bc0 [ 177.738238] ESI: 00e13230 EDI: c01c64a3 EBP: 0000000c ESP: bfb02b38 [ 177.738242] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00203296 [ 177.738247] Modules linked in: libfc scsi_transport_fc rfkill zram lpc_ich pcspkr i2c_i801 joydev sg parport_pc parport acpi_cpufreq ext4 mbcache jbd2 loop nls_utf8 isofs 8021q garp mrp stp llc i915 sr_mod cdrom sd_mod ata_generic i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ata_piix drm libata firewire_ohci e1000 yenta_socket firewire_core serio_raw crc_itu_t video sunrpc xts lrw dm_crypt dm_round_robin dm_multipath dm_snapshot dm_bufio dm_mirror dm_region_hash dm_log dm_zero dm_mod linear raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 iscsi_ibft squashfs cramfs be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb4i c[ 177.738365] ---[ end trace 9b02c2aca59094dc ]--- [ 177.738390] EIP: drm_pci_alloc+0x13a/0x1f0 [drm] [ 177.738394] Code: e7 04 8b bf c0 17 e2 c6 83 e7 f8 8d 04 c7 8b 38 81 e7 00 80 00 00 75 08 8b 78 04 83 e7 01 74 b3 ba 20 77 e8 f7 e8 06 07 39 ce <0f> 0b 8d 74 26 00 8d 45 e8 e8 38 7c 1c ce 84 c0 74 06 8b 3f 85 ff [ 177.738399] EAX: 00000000 EBX: edaa0540 ECX: c6a06315 EDX: 00000007 [ 177.738403] ESI: 00004000 EDI: c60d7fa0 EBP: ecb83b30 ESP: c6cb53bc [ 177.738406] DS: 007b ES: 007b FS: 00d8 GS:
- Author
Tried kernel-4.19.0 . Panic caused by Xorg by similar path, so whole 4.19.y tree seems broken. I'll try rewinding more... [ 178.757006] page:f370ec40 count:1 mapcount:0 mapping:00000000 index:0x0 compound_mapcount: 0 [ 178.757036] flags: 0x15008000(head) [ 178.757105] invalid opcode: 0000 [#1] SMP [ 178.757112] CPU: 0 PID: 1622 Comm: Xorg Not tainted 4.19.0-1.el8.i586 #1 [ 178.757116] Hardware name: IBM 2887HEJ/2887HEJ, BIOS 1VET62WW (1.20 ) 12/31/2004 [ 178.757128] EIP: drm_pci_alloc+0x13a/0x1f0 [ 178.757133] Code: e7 04 8b bf c0 57 7b cd 83 e7 f8 8d 04 c7 8b 38 81 e7 00 80 00 00 75 08 8b 78 04 83 e7 01 74 b3 ba e4 d8 34 cd e8 46 f8 cf ff <0f> 0b 8d 74 26 00 8d 45 e8 e8 f8 d5 b3 ff 84 c0 74 06 8b 3f 85 ff [ 178.757138] EAX: 00000000 EBX: ed2b1030 ECX: cd35ebb9 EDX: 00000007 [ 178.757142] ESI: 00004000 EDI: cc8d51f0 EBP: d45bbb34 ESP: d45bbb1c [ 178.757146] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00213246 [ 178.757150] CR0: 80050033 CR2: 018b73d4 CR3: 145c2000 CR4: 000006d0 [ 178.757154] Call Trace: [ 178.757167] ? i915_vma_unbind+0x6e/0x340 [ 178.757174] i915_gem_object_get_pages_phys+0x59/0x270 [ 178.757179] ? __i915_gem_object_unset_pages+0x123/0x1a0 [ 178.757184] ____i915_gem_object_get_pages+0x1f/0x40 [ 178.757190] i915_gem_object_attach_phys+0xba/0x15f [ 178.757196] intel_plane_pin_fb+0xa4/0xb0 [ 178.757202] intel_prepare_plane_fb+0x117/0x2c0 [ 178.757207] ? intel_crtc_get_vblank_counter+0x40/0x40 [ 178.757214] drm_atomic_helper_prepare_planes+0x42/0xd0 [ 178.757221] ? __i915_sw_fence_init+0x21/0x40 [ 178.757226] intel_atomic_commit+0x97/0x2c0 [ 178.757231] ? intel_atomic_commit_tail+0xd60/0xd60 [ 178.757237] drm_atomic_commit+0x3a/0x50 [ 178.757242] drm_atomic_helper_update_plane+0xbf/0xe0 [ 178.757247] intel_legacy_cursor_update+0x85/0x320 [ 178.757253] ? intel_unpin_fb_vma+0x40/0x40 [ 178.757258] __setplane_atomic+0x9a/0xd0 [ 178.757263] ? intel_unpin_fb_vma+0x40/0x40 [ 178.757267] drm_mode_cursor_universal+0x13c/0x270 [ 178.757275] drm_mode_cursor_common+0x17e/0x200 [ 178.757281] ? drm_mode_setplane+0x240/0x240 [ 178.757285] drm_mode_cursor_ioctl+0x57/0x70 [ 178.757290] drm_ioctl_kernel+0x88/0xd0 [ 178.757295] drm_ioctl+0x213/0x3a0 [ 178.757299] ? drm_mode_setplane+0x240/0x240 [ 178.757305] ? i915_gem_fault+0x1fd/0x5a0 [ 178.757313] ? page_trans_huge_mapcount+0x18/0x100 [ 178.757319] ? reuse_swap_page+0x83/0x3a0 [ 178.757325] ? ptep_set_access_flags+0x25/0x30 [ 178.757330] ? do_wp_page+0x12f/0x5e0 [ 178.757334] ? drm_version+0x80/0x80 [ 178.757340] do_vfs_ioctl+0x9a/0x6d0 [ 178.757346] ? selinux_file_ioctl+0x13b/0x1f0 [ 178.757352] ? selinux_bprm_set_creds+0x2d0/0x2d0 [ 178.757357] ? security_file_ioctl+0x30/0x50 [ 178.757361] ksys_ioctl+0x56/0x80 [ 178.757366] sys_ioctl+0x16/0x20 [ 178.757371] do_fast_syscall_32+0x7f/0x1e0 [ 178.757377] entry_SYSENTER_32+0x6b/0xbe [ 178.757381] EIP: 0xb7eddd19 [ 178.757386] Code: 08 8b 80 64 cd ff ff 85 d2 74 02 89 02 5d c3 8b 04 24 c3 8b 1c 24 c3 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 [ 178.757391] EAX: ffffffda EBX: 0000000c ECX: c01c64a3 EDX: bf86f1d0 [ 178.757395] ESI: 018b7260 EDI: c01c64a3 EBP: 0000000c ESP: bf86f148 [ 178.757399] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00203296 [ 178.757404] Modules linked in: libfc scsi_transport_fc zram lpc_ich sg pcspkr i2c_i801 joydev parport_pc parport acpi_cpufreq ext4 mbcache jbd2 loop nls_utf8 isofs sr_mod cdrom sd_mod ata_generic 8021q garp mrp stp llc ata_piix libata firewire_ohci e1000 firewire_core yenta_socket serio_raw crc_itu_t sunrpc xts lrw dm_crypt dm_round_robin dm_multipath dm_snapshot dm_bufio dm_mirror dm_region_hash dm_log dm_zero dm_mod linear raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 iscsi_ibft squashfs cramfs be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb4i cxgb4 libcxgbi libcxgb iscsi_tcp libiscsi_tcp libiscsi edd scsi_transport_iscsi [ 178.757489] ---[ end trace 00aad608a4986d39 ]--- [ 178.757494] EIP: drm_pci_alloc+0x13a/0x1f0 [ 178.757498] Code: e7 04 8b bf c0 57 7b cd 83 e7 f8 8d 04 c7 8b 38
- Author
Rewound back to kernel-4.14.0. Still Xorg panic with similar call path concerning drm_mode_cursor_universal(). [ 189.577204] page:f3d50740 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 189.577235] flags: 0x35008000(head) [ 189.577304] invalid opcode: 0000 [#1] SMP [ 189.577307] Modules linked in: libfc scsi_transport_fc zram arc4 ath5k mac80211 ath cfg80211 lpc_ich i2c_i801 pcspkr sg joydev rfkill parport_pc parport acpi_cpufreq ext4 mbcache jbd2 loop nls_utf8 isofs 8021q garp mrp stp llc sr_mod sd_mod cdrom ata_generic ata_piix libata e1000 firewire_ohci yenta_socket firewire_core serio_raw crc_itu_t sunrpc xts lrw dm_crypt dm_round_robin dm_multipath dm_snapshot dm_bufio dm_mirror dm_region_hash dm_log dm_zero dm_mod linear raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 iscsi_ibft squashfs cramfs be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb4i cxgb4 libcxgbi libcxgb iscsi_tcp libiscsi_tcp libiscsi edd scsi_transport_iscsi [ 189.577387] CPU: 0 PID: 1636 Comm: Xorg Not tainted 4.14.0-1.el8.i586 #1 [ 189.577390] Hardware name: IBM 2887HEJ/2887HEJ, BIOS 1VET62WW (1.20 ) 12/31/2004 [ 189.577394] task: d1016180 task.stack: d1068000 [ 189.577407] EIP: drm_pci_alloc+0x122/0x1a0 [ 189.577410] EFLAGS: 00213246 CPU: 0 [ 189.577413] EAX: 00000000 EBX: 00004000 ECX: da05e246 EDX: 00000007 [ 189.577416] ESI: f536def0 EDI: d9615d70 EBP: d1069b60 ESP: d1069b48 [ 189.577420] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [ 189.577423] CR0: 80050033 CR2: 00d0b3d4 CR3: 2bba4000 CR4: 000006d0 [ 189.577427] Call Trace: [ 189.577438] ? i915_vma_unbind+0x185/0x350 [ 189.577445] i915_gem_object_get_pages_phys+0x51/0x240 [ 189.577451] ____i915_gem_object_get_pages+0x1d/0x60 [ 189.577456] i915_gem_object_attach_phys+0xb9/0x105 [ 189.577463] intel_prepare_plane_fb+0x238/0x240 [ 189.577468] ? intel_crtc_get_vblank_counter+0x40/0x40 [ 189.577474] drm_atomic_helper_prepare_planes+0x3f/0xc0 [ 189.577479] intel_atomic_commit+0x5b/0x220 [ 189.577486] drm_atomic_commit+0x3a/0x50 [ 189.577491] drm_atomic_helper_update_plane+0xbf/0xe0 [ 189.577495] intel_legacy_cursor_update+0x69/0x370 [ 189.577502] __setplane_internal+0x13f/0x1c0 [ 189.577507] drm_mode_cursor_universal+0xd3/0x190 [ 189.577514] drm_mode_cursor_common+0x146/0x1c0 [ 189.577518] ? ggtt_bind_vma+0x51/0x90 [ 189.577523] drm_mode_cursor_ioctl+0x4b/0x60 [ 189.577527] ? drm_mode_setplane+0x190/0x190 [ 189.577531] drm_ioctl_kernel+0x4d/0xb0 [ 189.577535] drm_ioctl+0x19b/0x3a0 [ 189.577539] ? drm_mode_setplane+0x190/0x190 [ 189.577547] ? page_trans_huge_mapcount+0x18/0x100 [ 189.577553] ? reuse_swap_page+0x61/0x210 [ 189.577558] ? do_wp_page+0x2d3/0x5a0 [ 189.577562] ? handle_mm_fault+0x868/0xdd0 [ 189.577566] ? drm_getstats+0x30/0x30 [ 189.577574] do_vfs_ioctl+0x88/0x670 [ 189.577580] ? selinux_file_ioctl+0x10d/0x1d0 [ 189.577585] ? syscall_trace_enter+0x1bb/0x220 [ 189.577591] ? security_file_ioctl+0x3c/0x60 [ 189.577595] SyS_ioctl+0x50/0x70 [ 189.577599] do_fast_syscall_32+0x71/0x18c [ 189.577607] entry_SYSENTER_32+0x47/0x71 [ 189.577610] EIP: 0xb7f0dd29 [ 189.577613] EFLAGS: 00203292 CPU: 0 [ 189.577616] EAX: ffffffda EBX: 0000000c ECX: c01c64a3 EDX: bfe3fd90 [ 189.577619] ESI: 00d0b260 EDI: c01c64a3 EBP: 0000000c ESP: bfe3fd08 [ 189.577623] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b [ 189.577626] Code: 8b bf c0 14 48 da 83 e7 f8 8d 04 c7 8b 38 81 e7 00 80 00 00 75 0b 8b 78 14 83 e7 01 74 b8 8d 76 00 ba 98 ea 04 da e8 de 6b d3 ff <0f> 0b 8d 74 26 00 8b 3d d0 9d 16 da 85 ff 0f 85 2e ff ff ff 0f [ 189.577675] EIP: drm_pci_alloc+0x122/0x1a0 SS:ESP: 0068:d1069b48 [ 189.577684] ---[ end trace b8710fd94f5e2e8b ]--- [ 189.577688] Kernel panic - not syncing: Fatal exception [ 189.577696] Kernel Offset: 0x18600000 from 0xc1000000 (relocation range: 0xc0000000-0xf7ffdfff) [ 189.577700] ---[ end Kernel panic - not syncing: Fatal exception
- Author
Rewound back to 4.9.3 (4.9.0 wont boot on i386 due to 705df55bd0cf) Still similar panic triggered by Xorg. [ 195.879454] page:f415d5c0 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 195.879483] flags: 0x31004000(head) [ 195.879534] ------------[ cut here ]------------ [ 195.879537] kernel BUG at ./include/linux/page-flags.h:275! [ 195.879541] invalid opcode: 0000 [#1] SMP [ 195.879544] Modules linked in: libfc scsi_transport_fc zram arc4 ath5k mac80211 ath cfg80211 pcspkr joydev i2c_i801 lpc_ich rfkill sg i2c_smbus parport_pc parport acpi_cpufreq ext4 jbd2 mbcache loop nls_utf8 isofs 8021q garp stp llc mrp sr_mod cdrom sd_mod ata_generic ata_piix firewire_ohci libata firewire_core e1000 yenta_socket serio_raw crc_itu_t fjes sunrpc dm_crypt dm_round_robin dm_multipath dm_snapshot dm_bufio dm_mirror dm_region_hash dm_log dm_zero dm_mod linear raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 iscsi_ibft squashfs cramfs be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb4i cxgb4 libcxgbi libcxgb iscsi_tcp libiscsi_tcp libiscsi edd scsi_transport_iscsi [ 195.879633] CPU: 0 PID: 2139 Comm: Xorg Not tainted 4.9.3-1.el8.i586 #1 [ 195.879637] Hardware name: IBM 2887HEJ/2887HEJ, BIOS 1VET62WW (1.20 ) 12/31/2004 [ 195.879640] task: da72a400 task.stack: da712000 [ 195.879645] EIP: 0060:[<d262f21a>] EFLAGS: 00213292 CPU: 0 [ 195.879652] EIP is at drm_pci_alloc+0x11a/0x190 [ 195.879656] EAX: 00000000 EBX: 00004000 ECX: f3f0cf60 EDX: 00000007 [ 195.879659] ESI: f2637630 EDI: d22163a0 EBP: da713c0c ESP: da713bec [ 195.879663] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [ 195.879666] CR0: 80050033 CR2: 80dc7284 CR3: 1a584000 CR4: 000006d0 [ 195.879670] Stack: [ 195.879673] 024040c0 00000000 f3add068 da713c0c 024040c0 00000100 e9af9900 f2591780 [ 195.879682] da713c1c d26866c5 f3bb3400 e9af9900 da713c48 d26d0fda 00000002 da713c70 [ 195.879691] d261fecb d264323e f32f0000 f70f0a00 00000003 f2591780 e9abf800 da713c70 [ 195.879700] Call Trace: [ 195.879710] [<d26866c5>] i915_gem_object_attach_phys+0x65/0xa0 [ 195.879716] [<d26d0fda>] intel_prepare_plane_fb+0xea/0x270 [ 195.879722] [<d261fecb>] ? drm_atomic_helper_setup_commit+0x21b/0x300 [ 195.879728] [<d264323e>] ? drm_mode_object_reference+0x3e/0x90 [ 195.879735] [<d261c7ae>] drm_atomic_helper_prepare_planes+0x5e/0x110 [ 195.879739] [<d26c9939>] intel_atomic_commit+0x209/0x4b0 [ 195.879744] [<d263dbd0>] ? drm_atomic_get_crtc_state+0xb0/0xf0 [ 195.879748] [<d263e8b9>] drm_atomic_commit+0x49/0x50 [ 195.879753] [<d261d5dc>] drm_atomic_helper_update_plane+0xdc/0x110 [ 195.879759] [<d2644b9f>] __setplane_internal+0x18f/0x210 [ 195.879764] [<d2644e25>] drm_mode_cursor_common+0x205/0x380 [ 195.879769] [<d26457f0>] ? drm_mode_setplane+0x1c0/0x1c0 [ 195.879774] [<d264583b>] drm_mode_cursor_ioctl+0x4b/0x60 [ 195.879780] [<d262a5b9>] drm_ioctl+0x219/0x480 [ 195.879784] [<d26457f0>] ? drm_mode_setplane+0x1c0/0x1c0 [ 195.879792] [<d238cfc8>] ? __vma_link_file+0x38/0x50 [ 195.879797] [<d238ec3e>] ? vma_set_page_prot+0x2e/0x50 [ 195.879802] [<d23b7648>] ? page_trans_huge_mapcount+0x18/0x100 [ 195.879807] [<d238785b>] ? do_wp_page+0x2ab/0x7f0 [ 195.879811] [<d262a3a0>] ? drm_version+0x80/0x80 [ 195.879817] [<d23e32d8>] do_vfs_ioctl+0x88/0x720 [ 195.879823] [<d247774b>] ? selinux_file_ioctl+0x11b/0x1e0 [ 195.879828] [<d246eefc>] ? security_file_ioctl+0x3c/0x60 [ 195.879833] [<d23e39cb>] SyS_ioctl+0x5b/0x80 [ 195.879838] [<d220199b>] do_fast_syscall_32+0x8b/0x160 [ 195.879845] [<d298f707>] sysenter_past_esp+0x40/0x6a [ 195.879848] Code: 04 8b bf 40 4a 00 d3 83 e7 fc 8d 04 c7 8b 38 81 e7 00 40 00 00 75 0a 8b 78 14 83 e7 01 74 b8 66 90 ba 90 9f bf d2 e8 f6 40 d5 ff <0f> 0b 8d 74 26 00 8d 55 f0 8d 45 e8 e8 15 70 be ff 84 c0 74 29 [ 195.879905] EIP: [<d262f21a>] [ 195.879908] drm_pci_alloc+0x11a/0x190 [ 195.879911] SS:ESP 0068:da713bec [ 195.890383] ---[ end trace 3e92de545f804a5c ]--- [ 195.890387] Kernel panic - not syncing: Fatal exception [ 195.890394] Kernel Offset: 0x11200000 from 0xc1000000 (relocation range: 0xc0000000-0xf7ffdfff) [ 195.890398] ---[ end Kernel panic - not syncing: Fatal exception
- Reporter
commit de09d31dd38a50fdce106c15abd68432eebbd014 Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Date: Fri Jan 15 16:51:42 2016 -0800 page-flags: define PG_reserved behavior on compound pages As far as I can see there's no users of PG_reserved on compound pages. Let's use PF_NO_COMPOUND here. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Rik van Riel <riel@redhat.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Christoph Lameter <cl@linux.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Steve Capper <steve.capper@linaro.org> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.cz> Cc: Jerome Marchand <jmarchan@redhat.com> Cc: Jérôme Glisse <jglisse@redhat.com> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
defines SetPageReserved as a bug on a compound page, yet we do
drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t align) { drm_dma_handle_t *dmah; unsigned long addr; size_t sz; /* pci_alloc_consistent only guarantees alignment to the smallest * PAGE_SIZE order which is greater than or equal to the requested size. * Return NULL here for now to make sure nobody tries for larger alignment */ if (align > size) return NULL; dmah = kmalloc(sizeof(drm_dma_handle_t), GFP_KERNEL); if (!dmah) return NULL; dmah->size = size; dmah->vaddr = dma_alloc_coherent(&dev->pdev->dev, size, &dmah->busaddr, GFP_KERNEL | __GFP_COMP); if (dmah->vaddr == NULL) { kfree(dmah); return NULL; } /* XXX - Is virt_to_page() legal for consistent mem? */ /* Reserve */ for (addr = (unsigned long)dmah->vaddr, sz = size; sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) { SetPageReserved(virt_to_page((void *)addr)); } return dmah; }
- Reporter
Had a go to reproduce on i915gm (also uses physical cursors), did not hit the path immediately. But I should be able to write a mock test...
- Author
Rewinding all the way back to kernel-4.4.0, Xorg worked flawlessly and anaconda installer's Language Selection screen appeared properly. The commit Chris pointed out in https://gitlab.freedesktop.org/drm/intel/issues/1027#note_399284 commit de09d31dd38a50fdce106c15abd68432eebbd014 page-flags: define PG_reserved behavior on compound pages lies between 4.4.0 and 4.5-rc1, so this seems fishy (not tested now), but I don't have enough knowledge about memory management to fix this properly.
- Author
patch-revert-de09d31dd-PG_reserved.patch
Reverting the commit mentioned as in the attached patch made Xorg under kernel-5.5-rc7 work. Bingo.
But I think reverting this commit is not the Right Thing; should we use something other than
SetPageReserved(virt_to_page((void *)addr));
indrm_pci_alloc()
? - LAKSHMINARAYANA VUDUM added Community label
added Community label
- Author
Unpached kernel-5.5-rc7 had been working on Pentium 4 machine 00:02:0 VGA compatible controller [0300]: Intel Corporation 82865G Integrated Graphics Controller [8086:2572] (rev 02) so the problem seems to be hardware specific. It may not surface on latest hardware.
- Reporter
I'm testing this patch to remove our use of drm_pci_alloc and use dma_alloc_coherent directly.
- Reporter
Took a while, but we finally have the setup reproduced in CI.
<4> [143.516747] page:ffffea0000c32000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 compound_mapcount: 0 <4> [143.516782] raw: 4000000000010000 dead000000000100 dead000000000122 0000000000000000 <4> [143.516787] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 <4> [143.516792] page dumped because: VM_BUG_ON_PAGE(1 && PageCompound(page)) <4> [143.516829] ------------[ cut here ]------------ <2> [143.516834] kernel BUG at ./include/linux/page-flags.h:337! <4> [143.516897] invalid opcode: 0000 [#1] PREEMPT SMP PTI <4> [143.516904] CPU: 0 PID: 1078 Comm: kms_cursor_lega Tainted: G U 5.5.0-CI-CI_DRM_7861+ #1 <4> [143.516907] Hardware name: Dell Inc. OptiPlex GX280 /0G8310, BIOS A04 02/09/2005 <4> [143.516916] RIP: 0010:drm_pci_alloc+0xb6/0x110 <4> [143.516921] Code: 72 79 4c 89 c1 48 01 cf 48 c1 ef 0c 48 c1 e7 06 48 01 f7 48 8b 0f f7 c1 00 00 01 00 74 0e 48 c7 c6 a0 e6 2d 82 e8 2a a4 b4 ff <0f> 0b 48 8b 4f 08 83 e1 01 75 e9 48 83 3f ff 74 1c 3e 80 4f 01 10 <4> [143.516926] RSP: 0018:ffffc9000053f998 EFLAGS: 00010246 <4> [143.516932] RAX: 000000000000003c RBX: 0000000000004000 RCX: 0000000000000001 <4> [143.516935] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000ffffffff <4> [143.516938] RBP: ffff88803530a360 R08: ffff88802f962fe0 R09: 0000000000000000 <4> [143.516942] R10: ffff888030c80000 R11: 0000000000000000 R12: ffff888028610000 <4> [143.516945] R13: ffff888030ce19b0 R14: ffff888036a9d000 R15: 0000000000000000 <4> [143.516949] FS: 00007fb1902e8e40(0000) GS:ffff88803e200000(0000) knlGS:0000000000000000 <4> [143.516952] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [143.516956] CR2: 00007fb190255000 CR3: 000000002c998000 CR4: 00000000000006f0 <4> [143.516959] Call Trace: <4> [143.517120] i915_gem_object_get_pages_phys+0x54/0x2a0 [i915] <4> [143.517225] ____i915_gem_object_get_pages+0x21/0xc0 [i915] <4> [143.517327] i915_gem_object_attach_phys+0xca/0x300 [i915] <4> [143.517438] intel_plane_pin_fb+0xa1/0xd0 [i915] <4> [143.517547] intel_prepare_plane_fb+0x13b/0x5c0 [i915] <4> [143.517557] drm_atomic_helper_prepare_planes+0x85/0x110 <4> [143.517668] intel_atomic_commit+0xda/0x390 [i915] <4> [143.517676] drm_atomic_helper_update_plane+0x105/0x140 <4> [143.517684] drm_mode_cursor_universal+0x111/0x240 <4> [143.517697] drm_mode_cursor_common+0x1b6/0x230 <4> [143.517708] ? drm_mode_setplane+0x190/0x190 <4> [143.517713] drm_mode_cursor_ioctl+0x48/0x70 <4> [143.517721] drm_ioctl_kernel+0xad/0xf0 <4> [143.517728] drm_ioctl+0x2e1/0x390 <4> [143.517734] ? drm_mode_setplane+0x190/0x190 <4> [143.517744] ? __lock_acquire+0x460/0x15d0 <4> [143.517752] do_vfs_ioctl+0x9c/0x730 <4> [143.517757] ? find_held_lock+0x2d/0x90 <4> [143.517764] ? __task_pid_nr_ns+0xbc/0x1f0 <4> [143.517771] ksys_ioctl+0x35/0x60 <4> [143.517777] __x64_sys_ioctl+0x11/0x20 <4> [143.517782] do_syscall_64+0x4f/0x220 <4> [143.517788] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4> [143.517793] RIP: 0033:0x7fb18f5585d7 <4> [143.517797] Code: b3 66 90 48 8b 05 b1 48 2d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 81 48 2d 00 f7 d8 64 89 01 48 <4> [143.517801] RSP: 002b:00007ffe36170878 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 <4> [143.517805] RAX: ffffffffffffffda RBX: 000056380084b588 RCX: 00007fb18f5585d7 <4> [143.517808] RDX: 00007ffe361708b0 RSI: 00000000c01c64a3 RDI: 0000000000000005 <4> [143.517811] RBP: 00007ffe361708b0 R08: 0000000000000040 R09: 0000000000000000 <4> [143.517815] R10: 0000000000000056 R11: 0000000000000246 R12: 00000000c01c64a3 <4> [143.517818] R13: 0000000000000005 R14: 0000000000000001 R15: 0000000000000158 <4> [143.517827] Modules linked in: vgem i915 lpc_ich tg3 ptp pps_core prime_numbers <4> [143.519030] ---[ end trace d235f927091b517f ]--- <4> [143.519044] RIP: 0010:drm_pci_alloc+0xb6/0x110
- Reporter
commit c6790dc22312f592c1434577258b31c48c72d52a (HEAD -> drm-intel-next-queued, drm-intel/drm-intel-next-queued) Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Feb 2 15:39:34 2020 +0000 drm/i915: Wean off drm_pci_alloc/drm_pci_free drm_pci_alloc and drm_pci_free are just very thin wrappers around dma_alloc_coherent, with a note that we should be removing them. Furthermore since commit de09d31dd38a50fdce106c15abd68432eebbd014 Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Date: Fri Jan 15 16:51:42 2016 -0800 page-flags: define PG_reserved behavior on compound pages As far as I can see there's no users of PG_reserved on compound pages. Let's use PF_NO_COMPOUND here. drm_pci_alloc has been declared broken since it mixes GFP_COMP and SetPageReserved. Avoid this conflict by weaning ourselves off using the abstraction and using the dma functions directly. Reported-by: Taketo Kabe Closes: https://gitlab.freedesktop.org/drm/intel/issues/1027 Fixes: de09d31dd38a ("page-flags: define PG_reserved behavior on compound pages") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: <stable@vger.kernel.org> # v4.5+ Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200202153934.3899472-1-chris@chris-wilson.co.uk
But we also need to fixup drm_pci_alloc() -- if only because that will be easier to backport.
- Reporter
commit ea36ec8623f56791c6ff6738d0509b7920f85220 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Feb 2 17:16:31 2020 +0000 drm: Remove PageReserved manipulation from drm_pci_alloc drm_pci_alloc/drm_pci_free are very thin wrappers around the core dma facilities, and we have no special reason within the drm layer to behave differently. In particular, since commit de09d31dd38a50fdce106c15abd68432eebbd014 Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Date: Fri Jan 15 16:51:42 2016 -0800 page-flags: define PG_reserved behavior on compound pages As far as I can see there's no users of PG_reserved on compound pages. Let's use PF_NO_COMPOUND here. it has been illegal to combine GFP_COMP with SetPageReserved, so lets stop doing both and leave the dma layer to its own devices. Reported-by: Taketo Kabe Bug: https://gitlab.freedesktop.org/drm/intel/issues/1027 Fixes: de09d31dd38a ("page-flags: define PG_reserved behavior on compound pages") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: <stable@vger.kernel.org> # v4.5+ Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200202171635.4039044-1-chris@chris-wilson.co.uk
- Chris Wilson closed
closed
- Author
The patch mentioned in #1027 (comment 399914) (same as first commit
c6790dc2
) made kernel-5.5.0 work in ThinkPad R51 (i855GM) and Fujitsu/Siemens C601 (i865G).Just for success report.
- Chris Wilson mentioned in commit virgl/drm-misc-next@ea36ec86
mentioned in commit virgl/drm-misc-next@ea36ec86