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: <70145097-6157-dc62-3da6-3ba0b6cadb82@amd.com>
Date:   Mon, 2 Nov 2020 16:03:47 +0100
From:   Christian König <christian.koenig@....com>
To:     Bernard Zhao <bernard@...o.com>,
        Alex Deucher <alexander.deucher@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, Evan Quan <evan.quan@....com>,
        Luben Tuikov <luben.tuikov@....com>,
        Xiaojie Yuan <xiaojie.yuan@....com>,
        Changfeng <Changfeng.Zhu@....com>,
        Dave Airlie <airlied@...hat.com>,
        Nicholas Kazlauskas <nicholas.kazlauskas@....com>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Cc:     opensource.kernel@...o.com
Subject: Re: [PATCH] drm/amd: move DRM_ERROR log out of the mutex protect area

Am 02.11.20 um 04:14 schrieb Bernard Zhao:
> In function amdgpu_register_gpu_instance, there is no need to
> protect DRM_ERROR in mutex mgpu_info.mutex.
> This change is to make the code to run a bit fast.

NAK, performance for an error path in module load is pretty much irrelevant.

This just looks like a random unnecessary code change to me.

Regards,
Christian.

>
> Signed-off-by: Bernard Zhao <bernard@...o.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index efda38349a03..cc61b0a5b8d1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -104,8 +104,8 @@ void amdgpu_register_gpu_instance(struct amdgpu_device *adev)
>   	mutex_lock(&mgpu_info.mutex);
>   
>   	if (mgpu_info.num_gpu >= MAX_GPU_INSTANCE) {
> -		DRM_ERROR("Cannot register more gpu instance\n");
>   		mutex_unlock(&mgpu_info.mutex);
> +		DRM_ERROR("Cannot register more gpu instance\n");
>   		return;
>   	}
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ