[patch] drm/amdgpu: signedness bug in amdgpu_cs_parser_init()

Alex Deucher alexdeucher at gmail.com
Tue Sep 29 10:44:57 PDT 2015


On Fri, Sep 25, 2015 at 7:36 AM, Dan Carpenter <dan.carpenter at oracle.com> wrote:
> The "i" variable should be signed or it leads to a crash in the error
> handling code.
>
> Fixes: 1d263474c441 ('drm/amdgpu: unwind properly in amdgpu_cs_parser_init()')
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>

Applied.  thanks!

Alex

>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index 749420f..cb3c274 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -156,7 +156,8 @@ int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data)
>         uint64_t *chunk_array_user;
>         uint64_t *chunk_array;
>         struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
> -       unsigned size, i;
> +       unsigned size;
> +       int i;
>         int ret;
>
>         if (cs->in.num_chunks == 0)
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list