diff options
author | Nicolai Stange <nicstange@gmail.com> | 2016-12-03 15:47:00 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-12-05 08:28:37 +0100 |
commit | 1f32478f8fe5ac6f2f49670fc909f086c44a4b2f (patch) | |
tree | b31c7c32932faccd0b0676078b090883f1de2f66 /drivers/gpu/drm/radeon/radeon_device.c | |
parent | dabdcdc9822ae4e23cd7ff07090098d34f287b28 (diff) | |
download | linux-1f32478f8fe5ac6f2f49670fc909f086c44a4b2f.tar.gz linux-1f32478f8fe5ac6f2f49670fc909f086c44a4b2f.tar.bz2 linux-1f32478f8fe5ac6f2f49670fc909f086c44a4b2f.zip |
drm/radeon: 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, radeon_debugfs_add_files() accesses
->control->debugfs_root though. This results in the following Oops:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
IP: radeon_debugfs_add_files+0x90/0x100 [radeon]
PGD 0
Oops: 0000 [#1] SMP
[...]
Call Trace:
? work_on_cpu+0xb0/0xb0
radeon_fence_driver_init+0x120/0x150 [radeon]
si_init+0x122/0xd50 [radeon]
? _raw_spin_unlock_irq+0x2c/0x40
? device_pm_check_callbacks+0xb3/0xc0
radeon_device_init+0x958/0xda0 [radeon]
radeon_driver_load_kms+0x9a/0x210 [radeon]
drm_dev_register+0xa9/0xd0 [drm]
drm_get_pci_dev+0x9c/0x1e0 [drm]
radeon_pci_probe+0xb8/0xe0 [radeon]
[...]
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@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161203144700.2307-1-nicstange@gmail.com
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_device.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 0be8d5cd7826..2ce5ace5008a 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -1936,9 +1936,6 @@ int radeon_debugfs_add_files(struct radeon_device *rdev, rdev->debugfs_count = i; #if defined(CONFIG_DEBUG_FS) drm_debugfs_create_files(files, nfiles, - rdev->ddev->control->debugfs_root, - rdev->ddev->control); - drm_debugfs_create_files(files, nfiles, rdev->ddev->primary->debugfs_root, rdev->ddev->primary); #endif @@ -1953,9 +1950,6 @@ static void radeon_debugfs_remove_files(struct radeon_device *rdev) for (i = 0; i < rdev->debugfs_count; i++) { drm_debugfs_remove_files(rdev->debugfs[i].files, rdev->debugfs[i].num_files, - rdev->ddev->control); - drm_debugfs_remove_files(rdev->debugfs[i].files, - rdev->debugfs[i].num_files, rdev->ddev->primary); } #endif |