• Matthew Auld's avatar
    Revert "i915: use io_mapping_map_user" · 0e4fe0c9
    Matthew Auld authored
    This reverts commit b739f125.
    
    We are unfortunately seeing more issues like we did in 293837b9
    ("Revert "i915: fix remap_io_sg to verify the pgprot""), except this is
    now for the vm_fault_gtt path, where we are now hitting the same
    BUG_ON(!pte_none(*pte)):
    
    [10887.466150] kernel BUG at mm/memory.c:2183!
    [10887.466162] invalid opcode: 0000 [#1] PREEMPT SMP PTI
    [10887.466168] CPU: 0 PID: 7775 Comm: ffmpeg Tainted: G     U            5.13.0-rc3-CI-Nightly #1
    [10887.466174] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./J4205-ITX, BIOS P1.40 07/14/2017
    [10887.466177] RIP: 0010:remap_pfn_range_notrack+0x30f/0x440
    [10887.466188] Code: e8 96 d7 e0 ff 84 c0 0f 84 27 01 00 00 48 ba 00 f0 ff ff ff ff 0f 00 4c 89 e0 48 c1 e0 0c 4d 85 ed 75 96 48 21 d0 31 f6 eb a9 <0f> 0b 48 39 37 0f 85 0e 01 00 00 48 8b 0c 24 48 39 4f 08 0f 85 00
    [10887.466193] RSP: 0018:ffffc90006e33c50 EFLAGS: 00010286
    [10887.466198] RAX: 800000000000002f RBX: 00007f5e01800000 RCX: 0000000000000028
    [10887.466201] RDX: 0000000000000001 RSI: ffffea0000000000 RDI: 0000000000000000
    [10887.466204] RBP: ffffea000033fea8 R08: 800000000000002f R09: ffff8881072256e0
    [10887.466207] R10: ffffc9000b84fff8 R11: 0000000017dab000 R12: 0000000000089f9f
    [10887.466210] R13: 800000000000002f R14: 00007f5e017e4000 R15: ffff88800cffaf20
    [10887.466213] FS:  00007f5e04849640(0000) GS:ffff888278000000(0000) knlGS:0000000000000000
    [10887.466216] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [10887.466220] CR2: 00007fd9b191a2ac CR3: 00000001829ac000 CR4: 00000000003506f0
    [10887.466223] Call Trace:
    [10887.466233]  vm_fault_gtt+0x1ca/0x5d0 [i915]
    [10887.466381]  ? ktime_get+0x38/0x90
    [10887.466389]  __do_fault+0x37/0x90
    [10887.466395]  __handle_mm_fault+0xc46/0x1200
    [10887.466402]  handle_mm_fault+0xce/0x2a0
    [10887.466407]  do_user_addr_fault+0x1c5/0x660
    
    Reverting this commit is reported to fix the issue.
    Reported-by: default avatarEero Tamminen <eero.t.tamminen@intel.com>
    References: https://gitlab.freedesktop.org/drm/intel/-/issues/3519
    Fixes: b739f125 ("i915: use io_mapping_map_user")
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
    Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210527185145.458021-1-matthew.auld@intel.com
    0e4fe0c9
i915_mm.c 4.25 KB