Page MenuHomeFreeBSD

Don't leak resources in certain errors from i915_gem_do_execbuffer().
ClosedPublic

Authored by jhb on Sep 29 2015, 9:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 30, 6:03 AM
Unknown Object (File)
Mon, Sep 30, 3:06 AM
Unknown Object (File)
Sep 27 2024, 5:07 AM
Unknown Object (File)
Sep 24 2024, 1:59 AM
Unknown Object (File)
Sep 21 2024, 11:45 AM
Unknown Object (File)
Sep 19 2024, 12:53 PM
Unknown Object (File)
Sep 18 2024, 10:02 PM
Unknown Object (File)
Sep 18 2024, 3:59 AM
Subscribers

Details

Summary

Most error cases in i915_gem_do_execbuffer() jump to one of two labels to
release resources (such as unholding pages) when errors occur. Some
recently added error checks return immediately instead of jumping to a
label resulting in leaks.

More background: the last two days I've gotten a panic on my laptop
running HEAD from vm_page_unhold() claiming that there is a negative
hold count on a page. In the one core I looked at, the page in question
has a hold count of 0. However, subsequent pages have hold counts of
1554, 17470, 1468, 20744, 42994, etc. These all seem rather high to me,
so my guess is that the hold count is overflowing (hold_count is a
uint16_t).

Test Plan
  • I haven't tested this yet. Going to try it on my laptop and see if it blows up. Somehow running qemu-system-ppc64 seems to provoke this, or at least that is what I was doing the last two days that was "new".

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb retitled this revision from to Don't leak resources in certain errors from i915_gem_do_execbuffer()..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added reviewers: dumbbell, kib.
kib edited edge metadata.
This revision is now accepted and ready to land.Sep 30 2015, 6:10 AM
This revision was automatically updated to reflect the committed changes.