Re: [PATCH] Fix kunmap() argument in sg_miter_stop

Jeremy Fitzhardinge
2008-11-17T17:15:54Z

Ingo Molnar wrote:
> * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>
>
>> Jens Axboe wrote:
>>
>>> One exception is a real bug that this turned up. The XEN balloon driver
>>> passes the virt address into kunmap() as well, so that part should go in
>>> for 2.6.28. I've CC'ed Jeremy.
>>>
>>>
>> Oops. Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
>>
>
> Could you please send a changelogged fix for x86/urgent, to make sure
> this shows up in .28?
>

Subject: xen/balloon: kunmap takes a page *

Pass the struct page * to kunmap, not the vaddr of the mapping itself.

Pointed out by Jens Axboe <jens.axboe@oracle.com>

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
drivers/xen/balloon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

===================================================================
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -120,7 +120,7 @@
if (PageHighMem(page)) {
void *v = kmap(page);
clear_page(v);
- kunmap(v);
+ kunmap(page);
} else {
void *v = page_address(page);
clear_page(v);