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: <8abf5ddf-7c08-c2c0-92d4-d6c30058763c@linux.intel.com>
Date:   Wed, 2 Jun 2021 10:47:35 +0100
From:   Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>
To:     "Ursulin, Tvrtko" <tvrtko.ursulin@...el.com>,
        Zhihao Cheng <chengzhihao1@...wei.com>,
        "jani.nikula@...ux.intel.com" <jani.nikula@...ux.intel.com>,
        "joonas.lahtinen@...ux.intel.com" <joonas.lahtinen@...ux.intel.com>,
        "Vivi, Rodrigo" <rodrigo.vivi@...el.com>,
        "airlied@...ux.ie" <airlied@...ux.ie>,
        "daniel@...ll.ch" <daniel@...ll.ch>,
        "chris@...is-wilson.co.uk" <chris@...is-wilson.co.uk>
Cc:     "yukuai3@...wei.com" <yukuai3@...wei.com>,
        "intel-gfx@...ts.freedesktop.org" <intel-gfx@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: Fix return value check in
 live_breadcrumbs_smoketest()


On 01/06/2021 10:19, Ursulin, Tvrtko wrote:
> 
> [Don't see this on intel-gfx so I have to reply with top post.]
> 
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@...el.com>

Pushed with commit text wrapped and Fixes: tag fixed, thanks for the patch!

Regards,

Tvrtko

> 
> -----Original Message-----
> From: Zhihao Cheng <chengzhihao1@...wei.com>
> Sent: Saturday, May 29, 2021 5:33 AM
> To: jani.nikula@...ux.intel.com; joonas.lahtinen@...ux.intel.com; Vivi, Rodrigo <rodrigo.vivi@...el.com>; airlied@...ux.ie; daniel@...ll.ch; chris@...is-wilson.co.uk; Ursulin, Tvrtko <tvrtko.ursulin@...el.com>
> Cc: intel-gfx@...ts.freedesktop.org; dri-devel@...ts.freedesktop.org; linux-kernel@...r.kernel.org; chengzhihao1@...wei.com; yukuai3@...wei.com
> Subject: [PATCH] drm/i915/selftests: Fix return value check in live_breadcrumbs_smoketest()
> 
> In case of error, the function live_context() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR().
> 
> Fixes: 52c0fdb25c7c9 ("drm/i915: Replace global breadcrumbs ...")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Zhihao Cheng <chengzhihao1@...wei.com>
> ---
>   drivers/gpu/drm/i915/selftests/i915_request.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
> index ee8e753d98ce..eae0abd614cb 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_request.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_request.c
> @@ -1592,8 +1592,8 @@ static int live_breadcrumbs_smoketest(void *arg)
>   
>   	for (n = 0; n < smoke[0].ncontexts; n++) {
>   		smoke[0].contexts[n] = live_context(i915, file);
> -		if (!smoke[0].contexts[n]) {
> -			ret = -ENOMEM;
> +		if (IS_ERR(smoke[0].contexts[n])) {
> +			ret = PTR_ERR(smoke[0].contexts[n]);
>   			goto out_contexts;
>   		}
>   	}
> --
> 2.25.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ