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: <20150918224214.GA18173@syeh-linux>
Date:	Fri, 18 Sep 2015 15:42:14 -0700
From:	"Sinclair Yeh" <syeh@...are.com>
To:	Christian Engelmayer <cengelma@....at>
Cc:	airlied@...ux.ie, thellstrom@...are.com, brianp@...are.com,
	charmainel@...are.com, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] drm/vmwgfx: Fix uninitialized return in
 vmw_cotable_unbind()

Good catch!

Reviewed-by: Sinclair Yeh <syeh@...are.com>

On Sat, Sep 19, 2015 at 12:31:10AM +0200, Christian Engelmayer wrote:
> Function vmw_cotable_unbind() uses the uninitialized variable ret as
> return value. Make the result deterministic and directly return as
> the variable is unused anyway. Detected by Coverity CID 1324256.
> 
> Signed-off-by: Christian Engelmayer <cengelma@....at>
> ---
> Compile tested only. Applies against linux-next.
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
> index ce659a125f2b..092ea81eeff7 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
> @@ -311,7 +311,6 @@ static int vmw_cotable_unbind(struct vmw_resource *res,
>  	struct vmw_private *dev_priv = res->dev_priv;
>  	struct ttm_buffer_object *bo = val_buf->bo;
>  	struct vmw_fence_obj *fence;
> -	int ret;
>  
>  	if (list_empty(&res->mob_head))
>  		return 0;
> @@ -328,7 +327,7 @@ static int vmw_cotable_unbind(struct vmw_resource *res,
>  	if (likely(fence != NULL))
>  		vmw_fence_obj_unreference(&fence);
>  
> -	return ret;
> +	return 0;
>  }
>  
>  /**
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ