]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] rme96xx: fix PageReserved range
authorHugh Dickins <hugh@veritas.com>
Wed, 22 Jun 2005 00:15:09 +0000 (17:15 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 22 Jun 2005 01:46:20 +0000 (18:46 -0700)
rme96xx busmaster_malloc miscalculates and fails to set PageReserved on any
page of char *buf; but busmaster_free does it right, so do the same (I
don't have the card, just noticed this while sifting for rmap BUGs).

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sound/oss/rme96xx.c

index 76774bbc143685138429c6fb6b895bee2bd886c7..b4278eecc9171dc0123809589249d236b4111b30 100644 (file)
@@ -807,7 +807,7 @@ static void* busmaster_malloc(int size) {
                 struct page* page, *last_page;
 
                 page = virt_to_page(buf);
-                last_page = virt_to_page(buf + (1 << pg));
+                last_page = page + (1 << pg);
                 DBG(printk("setting reserved bit\n"));
                 while (page < last_page) {
                        SetPageReserved(page);