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: <MWHPR12MB1694E2D741B63E2C2E7C4DB7F7830@MWHPR12MB1694.namprd12.prod.outlook.com>
Date:   Mon, 5 Dec 2016 20:33:05 +0000
From:   "Deucher, Alexander" <Alexander.Deucher@....com>
To:     'Nicolai Stange' <nicstange@...il.com>,
        Daniel Vetter <daniel.vetter@...el.com>
CC:     "Koenig, Christian" <Christian.Koenig@....com>,
        Michel Dänzer <michel@...nzer.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
Subject: RE: [PATCH] drm/amdgpu: don't add files at control minor debugfs
 directory

> -----Original Message-----
> From: Nicolai Stange [mailto:nicstange@...il.com]
> Sent: Monday, December 05, 2016 3:30 PM
> To: Daniel Vetter
> Cc: Deucher, Alexander; Koenig, Christian; Michel Dänzer; linux-
> kernel@...r.kernel.org; dri-devel@...ts.freedesktop.org; Nicolai Stange
> Subject: [PATCH] drm/amdgpu: don't add files at control minor debugfs
> directory
> 
> Since commit 8a357d10043c ("drm: Nerf DRM_CONTROL nodes"), a
> struct drm_device's ->control member is always NULL.
> 
> In the case of CONFIG_DEBUG_FS=y, amdgpu_debugfs_add_files() accesses
> ->control->debugfs_root though. This results in a NULL pointer
> dereference.
> 
> Fix this by omitting the drm_debugfs_create_files() call for the
> control minor debugfs directory which is now non-existent anyway.
> 
> Fixes: 8a357d10043c ("drm: Nerf DRM_CONTROL nodes")
> Signed-off-by: Nicolai Stange <nicstange@...il.com>

Please add the bugzilla:
https://bugs.freedesktop.org/show_bug.cgi?id=98915
With that,
Reviewed-by: Alex Deucher <alexander.deucher@....com>

> ---
> Applicable to next-20161202. Compile-only tested.
> 
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index deee2db..0cb3e82 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2493,9 +2493,6 @@ int amdgpu_debugfs_add_files(struct
> amdgpu_device *adev,
>  	adev->debugfs_count = i;
>  #if defined(CONFIG_DEBUG_FS)
>  	drm_debugfs_create_files(files, nfiles,
> -				 adev->ddev->control->debugfs_root,
> -				 adev->ddev->control);
> -	drm_debugfs_create_files(files, nfiles,
>  				 adev->ddev->primary->debugfs_root,
>  				 adev->ddev->primary);
>  #endif
> @@ -2510,9 +2507,6 @@ static void amdgpu_debugfs_remove_files(struct
> amdgpu_device *adev)
>  	for (i = 0; i < adev->debugfs_count; i++) {
>  		drm_debugfs_remove_files(adev->debugfs[i].files,
>  					 adev->debugfs[i].num_files,
> -					 adev->ddev->control);
> -		drm_debugfs_remove_files(adev->debugfs[i].files,
> -					 adev->debugfs[i].num_files,
>  					 adev->ddev->primary);
>  	}
>  #endif
> --
> 2.10.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ