Hi, Jon!

Jon Smirl wrote:

This should fix it. I'm I'll check it in after I reboot and test it.
It didn't occur to me that DRM(global) could be freed while the loop
is in progress.

I need to remember to keep testing everything with framebuffer loaded
and again without it loaded.

[EMAIL PROTECTED] drm-bk]$ bk -r diffs -u
===== linux/drm_drv.h 1.21 vs edited =====
--- 1.21/linux/drm_drv.h        2004-09-21 20:29:48 -04:00
+++ edited/linux/drm_drv.h      2004-10-06 19:56:06 -04:00
@@ -664,7 +664,7 @@
       DRM_DEBUG( "\n" );
       if (DRM(fb_loaded)) {
               if (DRM(global)) {
-                       for (i = 0; i < DRM(global)->cards_limit; i++) {
+                       for (i = 0; DRM(global) && (i <
DRM(global)->cards_limit); i++) {
                               minor = &DRM(global)->minors[i];
                               dev = minor->dev;
                               DRM_DEBUG("fb loaded release minor
%d\n", dev->minor);



Not that it usually happens in practice, but isn't it perfectly valid for a C compiler evaluating

A && B

to evaluate B first and then A, or am I not keeping up with the C standard changes?
Had some crashes on Irix back in the early 90's related to this :)


Regards,

Thomas







-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to