From: Arjan van de Ven Date: Wed, 19 Nov 2008 23:36:19 +0000 (-0800) Subject: lib/scatterlist.c: fix kunmap() argument in sg_miter_stop() X-Git-Tag: v2.6.28-rc6~39 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f652c521e0bec2e70cf123f47e80117a7e6ed139;p=linux-2.6-omap-h63xx.git lib/scatterlist.c: fix kunmap() argument in sg_miter_stop() kunmap() takes as argument the struct page that orginally got kmap()'d, however the sg_miter_stop() function passed it the kernel virtual address instead, resulting in weird stuff. Somehow I ended up fixing this bug by accident while looking for a bug in the same area. Reported-by: kerneloops.org Acked-by: Tejun Heo Signed-off-by: Arjan van de Ven Cc: Hugh Dickins Cc: [2.6.27.x] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 8d2688ff135..b7b449dafbe 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -395,7 +395,7 @@ void sg_miter_stop(struct sg_mapping_iter *miter) WARN_ON(!irqs_disabled()); kunmap_atomic(miter->addr, KM_BIO_SRC_IRQ); } else - kunmap(miter->addr); + kunmap(miter->page); miter->page = NULL; miter->addr = NULL;