From: Hugh Dickins Date: Wed, 22 Jun 2005 00:15:09 +0000 (-0700) Subject: [PATCH] rme96xx: fix PageReserved range X-Git-Tag: accepted/tizen/common/20141203.182822~42691^2~21^2~134 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c2f3fda5666c280bcd00ac3b86963270b23e796;p=platform%2Fkernel%2Flinux-arm64.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 76774bb..b4278ee 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);