Bug 81712 - [i915] NULL pointer dereference in i915_debugfs.c/per_file_stats
Summary: [i915] NULL pointer dereference in i915_debugfs.c/per_file_stats
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Imre Deak
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-24 10:53 UTC by Tvrtko Ursulin
Modified: 2017-07-03 12:22 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Tvrtko Ursulin 2014-07-24 10:53:11 UTC
Line in question is i915_gem_obj_ggtt_bound.

It seemed to be easy to reproduce here by running "watch -n0.1 cat /sys/kernel/debug/dri/0/i915_gem_objects" in one terminal and then run IGT/gem_userptr_blits in another.

[58886.861602] general protection fault: 0000 [#1] PREEMPT SMP 
[58886.861608] Modules linked in: i915 i2c_algo_bit drm_kms_helper drm lpc_ich mfd_core nls_iso8859_1 i2c_hid video hid_generic usbhid hid e1000e ahci ptp libahci pps_core
[58886.861610] CPU: 3 PID: 8220 Comm: cat Not tainted 3.16.0-rc6+ #4
[58886.861611] Hardware name: Intel Corporation Shark Bay Client platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0119.R00.1303230105 03/23/2013
[58886.861612] task: ffff8800219642c0 ti: ffff880047024000 task.ti: ffff880047024000
[58886.861625] RIP: 0010:[<ffffffffa0137c70>]  [<ffffffffa0137c70>] per_file_stats+0x110/0x160 [i915]
[58886.861626] RSP: 0018:ffff880047027d48  EFLAGS: 00010246
[58886.861627] RAX: 6b6b6b6b6b6b6b6b RBX: ffff880047027e30 RCX: 0000000000000000
[58886.861627] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff88003a05cd00
[58886.861628] RBP: ffff880047027d58 R08: 0000000000000001 R09: 0000000000000000
[58886.861628] R10: ffff8800219642c0 R11: 0000000000000000 R12: ffff88003a05cd00
[58886.861629] R13: 0000000000000000 R14: ffff88003a05cd00 R15: ffff880047027d88
[58886.861630] FS:  00007f5f73a13740(0000) GS:ffff88014e380000(0000) knlGS:0000000000000000
[58886.861630] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[58886.861631] CR2: 00000000023ff038 CR3: 0000000021a4b000 CR4: 00000000001407e0
[58886.861631] Stack:
[58886.861632]  0000000000000001 000000000000ffff ffff880047027dc8 ffffffff813438e4
[58886.861634]  ffff880047027e30 ffffffffa0137b60 ffff880021a8af58 ffff880021a8f1a0
[58886.861635]  ffff8800a2061fb0 ffff8800a2062048 ffff8800a2061fb0 ffff8800a1e23478
[58886.861635] Call Trace:
[58886.861638]  [<ffffffff813438e4>] idr_for_each+0xf4/0x180
[58886.861646]  [<ffffffffa0137b60>] ? i915_gem_stolen_list_info+0x1f0/0x1f0 [i915]
[58886.861652]  [<ffffffffa013a17a>] i915_gem_object_info+0x5ca/0x6a0 [i915]
[58886.861654]  [<ffffffff81193ec5>] seq_read+0xf5/0x3a0
[58886.861656]  [<ffffffff8116d950>] vfs_read+0x90/0x150
[58886.861657]  [<ffffffff8116e509>] SyS_read+0x49/0xb0
[58886.861659]  [<ffffffff815d8622>] tracesys+0xd0/0xd5
[58886.861672] Code: 01 00 00 49 39 84 24 08 01 00 00 74 55 49 8b 84 24 b8 00 00 00 48 01 43 18 31 c0 5b 41 5c 5d c3 0f 1f 00 49 8b 44 24 08 4c 89 e7 <48> 8b 70 28 48 81 c6 48 80 00 00 e8 80 14 01 00 84 c0 74 bc 49 
[58886.861678] RIP  [<ffffffffa0137c70>] per_file_stats+0x110/0x160 [i915]
[58886.861679]  RSP <ffff880047027d48>
[58886.861680] ---[ end trace 059d48241e2b30e2 ]---
Comment 1 Tvrtko Ursulin 2014-07-24 10:54:29 UTC
Forgot to add the kernel version. It is kernel.org 3.16-rc6.
Comment 2 Chris Wilson 2014-07-24 14:33:26 UTC
http://patchwork.freedesktop.org/patch/30345/
Comment 3 Chris Wilson 2014-08-08 12:50:55 UTC
commit dff01de1c3cafb128344fe809cbca84606b1b65c
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jul 24 14:23:10 2014 +0100

    drm: Unlink dead file_priv from list of active files first
Comment 4 Jari Tahvanainen 2017-07-03 12:22:12 UTC
Closing ~3 years old resolved+fixed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.