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: <877d1zrcdm.fsf@intel.com>
Date:   Mon, 19 Sep 2022 11:34:29 +0300
From:   Jani Nikula <jani.nikula@...ux.intel.com>
To:     Li Zhong <floridsleeves@...il.com>, linux-kernel@...r.kernel.org,
        linux-media@...r.kernel.org, linaro-mm-sig@...ts.linaro.org,
        dri-devel@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org
Cc:     airlied@...hat.com, ville.syrjala@...ux.intel.com,
        christian.koenig@....com, sumit.semwal@...aro.org, daniel@...ll.ch,
        airlied@...ux.ie, tvrtko.ursulin@...ux.intel.com,
        rodrigo.vivi@...el.com, joonas.lahtinen@...ux.intel.com,
        Li Zhong <floridsleeves@...il.com>
Subject: Re: [PATCH v1] drivers/gpu/drm/i915/gt: Check the return value of
 i915_active_acquire()

On Sun, 18 Sep 2022, Li Zhong <floridsleeves@...il.com> wrote:
> i915_active_acquire() could return error when the acquire fails. Check
> and return the error code.

The commit message should explain why you don't need to do further error
handling. Or do you?

Side note, the distribution list is excessive.

BR,
Jani.


> Signed-off-by: Li Zhong <floridsleeves@...il.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_timeline.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c b/drivers/gpu/drm/i915/gt/intel_timeline.c
> index b9640212d659..d8333ab64574 100644
> --- a/drivers/gpu/drm/i915/gt/intel_timeline.c
> +++ b/drivers/gpu/drm/i915/gt/intel_timeline.c
> @@ -211,7 +211,10 @@ int intel_timeline_pin(struct intel_timeline *tl, struct i915_gem_ww_ctx *ww)
>  	GT_TRACE(tl->gt, "timeline:%llx using HWSP offset:%x\n",
>  		 tl->fence_context, tl->hwsp_offset);
>  
> -	i915_active_acquire(&tl->active);
> +	err = i915_active_acquire(&tl->active);
> +	if (err)
> +		return err;
> +
>  	if (atomic_fetch_inc(&tl->pin_count)) {
>  		i915_active_release(&tl->active);
>  		__i915_vma_unpin(tl->hwsp_ggtt);

-- 
Jani Nikula, Intel Open Source Graphics Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ