[Bug 35502] Regression: black screen with Radeon KMS in 2.6.38 (2.6.37.4 worked fine)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugs.freedesktop.org/show_bug.cgi?id=35502

--- Comment #4 from John Lindgren <john.lindgren@xxxxxxx> 2011-03-22 12:57:59 PDT ---
The problem is very simple.  There is no sanity check in the loop added by that
commit to ensure that record->ucRecordSize is nonzero.  Hence the driver gets
stuck in an infinite loop.

diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c
b/drivers/gpu/drm/radeon/radeon_atombios.c
index a2dfe25..2525e86 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -679,7 +679,8 @@ bool
radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
                             ATOM_ENCODER_CAP_RECORD *cap_record;
                             u16 caps = 0;

-                            while (record->ucRecordType > 0 &&
+                            while (record->ucRecordSize > 0 &&
+                                   record->ucRecordType > 0 &&
                                    record->ucRecordType <=
ATOM_MAX_OBJECT_RECORD_NUMBER) {
                                 switch (record->ucRecordType) {
                                 case ATOM_ENCODER_CAP_RECORD_TYPE:

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux