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: <bebb72d9-f9cc-c247-2d1c-96495aaf5f54@amd.com>
Date:   Sun, 30 Jan 2022 09:56:12 +0100
From:   Christian König <christian.koenig@....com>
To:     zhanglianjie <zhanglianjie@...ontech.com>,
        Alex Deucher <alexander.deucher@....com>
Cc:     linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        amd-gfx@...ts.freedesktop.org, Daniel Vetter <daniel@...ll.ch>,
        David Airlie <airlied@...ux.ie>,
        "Pan, Xinhui" <Xinhui.Pan@....com>
Subject: Re: [PATCH 2/2] drm/radeon/uvd: Fix forgotten unmap buffer objects



Am 29.01.22 um 08:35 schrieb zhanglianjie:
> after the buffer object is successfully mapped, call radeon_bo_kunmap before the function returns.
>
> Signed-off-by: zhanglianjie <zhanglianjie@...ontech.com>
>
> diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
> index 377f9cdb5b53..c5482f7793db 100644
> --- a/drivers/gpu/drm/radeon/radeon_uvd.c
> +++ b/drivers/gpu/drm/radeon/radeon_uvd.c
> @@ -497,6 +497,7 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
>   	handle = msg[2];
>
>   	if (handle == 0) {
> +		radeon_bo_kunmap(bo);
>   		DRM_ERROR("Invalid UVD handle!\n");
>   		return -EINVAL;
>   	}
> @@ -559,11 +560,10 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
>   		return 0;
>
>   	default:
> -
>   		DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type);
> -		return -EINVAL;
>   	}
>
> +	radeon_bo_kunmap(bo);
>   	BUG();

That looks like it will trigger this BUG() now. Please also remove that 
line.

Apart from that the patches look good to me.

Regards,
Christian.

>   	return -EINVAL;
>   }
> --
> 2.20.1
>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ