lkml.org 
[lkml]   [2001]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[2.4.9] ati_pcigart.h ob1 bug
From
Date
I think there is an ob1 bug in ati_alloc_pcigart_table: it is reserving
one page too much beyond the region returned by __get_free_pages.
Similarily, ati_free_pcigart_table should unreserve one page less.

--- linux-2.4.9/drivers/char/drm/ati_pcigart.h 2001/08/18 15:13:16 1.1
+++ linux-2.4.9/drivers/char/drm/ati_pcigart.h 2001/08/18 15:13:43
@@ -57,7 +57,7 @@

page = virt_to_page( address );

- for ( i = 0 ; i <= ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
+ for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
atomic_inc( &page->count );
SetPageReserved( page );
}
@@ -76,7 +76,7 @@

page = virt_to_page( address );

- for ( i = 0 ; i <= ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
+ for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
atomic_dec( &page->count );
ClearPageReserved( page );
}
Andreas.

--
Andreas Schwab "And now for something
SuSE Labs completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:57    [W:0.039 / U:1.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site