Bug 20260 - some fault in xf86FBManagerLinear memory management
Summary: some fault in xf86FBManagerLinear memory management
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/Xorg (show other bugs)
Version: 7.4 (2008.09)
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-22 18:55 UTC by Bo Du
Modified: 2018-06-12 18:43 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Bo Du 2009-02-22 18:55:02 UTC
There is some fault in the memory management algorithm of xf86FBManagerLinear.
It perform combine backwards without checking pLinkPrev->free, it will cause video memory lost in some situation.

Line 1030 in xorg-server-1.5.2\hw\xfree86\common\xf86fbman.c
   static void localFreeOffscreenLinear(FBLinearPtr linear)

1020   pLink->free = 1;

1029   if(pLinkPrev) {
1030   	if (pLinkPrev->next && pLinkPrev->next->free && !pLinkPrev->area) {
1031      	    FBLinearLinkPtr p = pLinkPrev->next;
1032      	    pLinkPrev->linear.size += p->linear.size;
1033      	    pLinkPrev->next = p->next;
1034      	    free(p);
1035    	}
1036   } 


The fault:
missing check whether pLinkPrev->free ??? but check pLinkPrev->next->free wrongly ? In fact, no need to check pLinkPrev->next->free, because it is set as 1 already in Line 1020.
Comment 1 Adam Jackson 2018-06-12 18:43:19 UTC
Mass closure: This bug has been untouched for more than six years, and is not obviously still valid. Please file a new report if you continue to experience issues with a current server.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.