From: Hugh Dickins Date: Wed, 22 Jun 2005 00:15:09 +0000 (-0700) Subject: [PATCH] rme96xx: fix PageReserved range X-Git-Tag: v2.6.13-rc4~130^2~202^2~134 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7c2f3fda5666c280bcd00ac3b86963270b23e796;p=linux-2.6-omap-h63xx.git [PATCH] rme96xx: fix PageReserved range 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/sound/oss/rme96xx.c b/sound/oss/rme96xx.c index 76774bbc143..b4278eecc91 100644 --- a/sound/oss/rme96xx.c +++ b/sound/oss/rme96xx.c @@ -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);