Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 419BDC433EF for ; Tue, 8 Feb 2022 08:23:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7D52210E40D; Tue, 8 Feb 2022 08:23:41 +0000 (UTC) X-Greylist: delayed 1287 seconds by postgrey-1.36 at gabe; Tue, 08 Feb 2022 03:36:42 UTC Received: from smtpproxy21.qq.com (smtpbg704.qq.com [203.205.195.105]) by gabe.freedesktop.org (Postfix) with ESMTPS id EE8CB10E348 for ; Tue, 8 Feb 2022 03:36:42 +0000 (UTC) X-QQ-mid: bizesmtp2t1644291398t3xbqyerh Received: from [10.4.23.96] (unknown [58.240.82.166]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 08 Feb 2022 11:36:36 +0800 (CST) X-QQ-SSF: 01400000002000B0H000B00A0000000 X-QQ-FEAT: lga9F5KbxYawbaOc+Y78OToQZSS1FMhHEE60ySNGprGK0jFFVzBXBmsMxTlbe 38150VsNOnbqdC+qVPXGDC5+h0xSQ/eoGALgQw5CmveL282T3X8JjM4CHy4CDhiEJGEpMd8 WtuEgRY/xfJFUAkcbAekAx0R5k0EDf6V0DxobR+M/KHTfSMPbPbSYTTP2l4NpTEk/9PoQ/Y tiowZM/SBa0eRm4vp7HPFvpGGHi2XkN7fsT5IvWaJxkGto3WJQUyMxvVVTCd4jeYtlJG3qY /0cmOUclzlNkKN1aVXdImTnX4x2m2DG5w/QLXGnGcoJ1bbRP2WjJLN4mVNWS0J3qc5NA99o wZSRJ2B93zbqiDzG/XjEA4Jfli9Ew== X-QQ-GoodBg: 2 Message-ID: <3fae80af-36e9-0219-4ebb-4830dca7f7e9@uniontech.com>+3B933B9D52E5EDAF Date: Tue, 8 Feb 2022 11:36:36 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: [PATCH 2/2] drm/radeon/uvd: Fix forgotten unmap buffer objects To: =?UTF-8?Q?Christian_K=c3=b6nig?= , Alex Deucher References: <20220129073524.31534-1-zhanglianjie@uniontech.com> <20220129073524.31534-2-zhanglianjie@uniontech.com> From: zhanglianjie In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign5 X-QQ-Bgrelay: 1 X-Mailman-Approved-At: Tue, 08 Feb 2022 08:23:40 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , "Pan, Xinhui" , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, Thanks for your review. I have resubmitted, see https://lkml.org/lkml/2022/2/7/2014 > > > 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 >> >> 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 >> >> >> > >