* [PATCH] drm/radeon/kms/agp The wrong AGP chipset can cause a NULL pointer dereference
@ 2010-04-24 0:18 Robert Fitzsimons
0 siblings, 0 replies; only message in thread
From: Robert Fitzsimons @ 2010-04-24 0:18 UTC (permalink / raw)
To: Dave Airlie, linux-kernel
Selecting the wrong or no CONFIG_AGP_* chipset can cause a NULL pointer
dereference when combined with CONFIG_DRM_RADEON_KMS and an old system
with a R100 AGP card (should effect other cards too). The agp field
will be set to NULL if no suitable AGP chipset driver is loaded,
drm_agp_acquire already preforms a suitable NULL check so it can be used
directly.
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
---
drivers/gpu/drm/radeon/radeon_agp.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_agp.c b/drivers/gpu/drm/radeon/radeon_agp.c
index c445779..28e473f 100644
--- a/drivers/gpu/drm/radeon/radeon_agp.c
+++ b/drivers/gpu/drm/radeon/radeon_agp.c
@@ -134,12 +134,10 @@ int radeon_agp_init(struct radeon_device *rdev)
int ret;
/* Acquire AGP. */
- if (!rdev->ddev->agp->acquired) {
- ret = drm_agp_acquire(rdev->ddev);
- if (ret) {
- DRM_ERROR("Unable to acquire AGP: %d\n", ret);
- return ret;
- }
+ ret = drm_agp_acquire(rdev->ddev);
+ if (ret) {
+ DRM_ERROR("Unable to acquire AGP: %d\n", ret);
+ return ret;
}
ret = drm_agp_info(rdev->ddev, &info);
--
1.7.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-24 0:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-24 0:18 [PATCH] drm/radeon/kms/agp The wrong AGP chipset can cause a NULL pointer dereference Robert Fitzsimons
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox