path: root/lib
diff options
authorArjan van de Ven <>2008-11-19 15:36:19 -0800
committerLinus Torvalds <>2008-11-19 18:49:58 -0800
commitf652c521e0bec2e70cf123f47e80117a7e6ed139 (patch)
tree8c82d64a8b9221460f9fb14bd7d3c2c863dd264a /lib
parenta495a6d35a026826d54a69d01f373681e14f59ac (diff)
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: 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 <>
Diffstat (limited to 'lib')
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 8d2688ff1352..b7b449dafbe5 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -395,7 +395,7 @@ void sg_miter_stop(struct sg_mapping_iter *miter)
kunmap_atomic(miter->addr, KM_BIO_SRC_IRQ);
} else
- kunmap(miter->addr);
+ kunmap(miter->page);
miter->page = NULL;
miter->addr = NULL;