[PATCH] rme96xx: fix PageReserved range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
---

 sound/oss/rme96xx.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- 2.6.12-rc6/sound/oss/rme96xx.c	2005-03-02 07:38:55.000000000 +0000
+++ linux/sound/oss/rme96xx.c	2005-06-04 20:41:55.000000000 +0100
@@ -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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux