lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <158741002592.19285.15203193760043173103@build.alporthouse.com>
Date:   Mon, 20 Apr 2020 20:13:45 +0100
From:   Chris Wilson <chris@...is-wilson.co.uk>
To:     Daniel Vetter <daniel@...ll.ch>, David Airlie <airlied@...ux.ie>,
        Imre Deak <imre.deak@...el.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Matthew Auld <matthew.auld@...el.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Tvrtko Ursulin <tvrtko.ursulin@...el.com>,
        Xiyu Yang <xiyuyang19@...an.edu.cn>,
        dri-devel@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Cc:     yuanxzhang@...an.edu.cn, kjlu@....edu,
        Xiyu Yang <xiyuyang19@...an.edu.cn>,
        Xin Tan <tanxin.ctf@...il.com>
Subject: Re: [PATCH] drm/i915/selftests:  Fix i915_address_space refcnt leak

Quoting Xiyu Yang (2020-04-20 06:41:54)
> igt_ppgtt_pin_update() invokes i915_gem_context_get_vm_rcu(), which
> returns a reference of the i915_address_space object to "vm" with
> increased refcount.
> 
> When igt_ppgtt_pin_update() returns, "vm" becomes invalid, so the
> refcount should be decreased to keep refcount balanced.
> 
> The reference counting issue happens in two exception handling paths of
> igt_ppgtt_pin_update(). When i915_gem_object_create_internal() returns
> IS_ERR, the refcnt increased by i915_gem_context_get_vm_rcu() is not
> decreased, causing a refcnt leak.
> 
> Fix this issue by jumping to "out_vm" label when
> i915_gem_object_create_internal() returns IS_ERR.
> 
> Fixes: 4049866f0913 ("drm/i915/selftests: huge page tests")

Actually,
Fixes: a4e7ccdac38e ("drm/i915: Move context management under GEM")

> Signed-off-by: Xiyu Yang <xiyuyang19@...an.edu.cn>
> Signed-off-by: Xin Tan <tanxin.ctf@...il.com>

Other than that,
Reviewed-by: Chris Wilson <chris@...is-wilson.co.uk>
-Chris

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ