linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.4.9] ati_pcigart.h ob1 bug
@ 2001-08-18 15:21 Andreas Schwab
  0 siblings, 0 replies; only message in thread
From: Andreas Schwab @ 2001-08-18 15:21 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-18 15:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-18 15:21 [2.4.9] ati_pcigart.h ob1 bug Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).