[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH][linux 2.6.18] correct grant page unmapping in scsiback

From: Juergen Gross <jgross@xxxxxxxx>

In function scsiback_fast_flush_area() the unmap array is set up with sparse
entries in case of some grant pages could not be mapped originally. This can
lead to never unmapped grant pages.

The unmap array is to be indexed with the so far found number of valid grants,
not with the loop variable.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

diff -r 0251893a7d5a drivers/xen/scsiback/scsiback.c
--- a/drivers/xen/scsiback/scsiback.c   Mon Jun 16 16:11:33 2014 +0200
+++ b/drivers/xen/scsiback/scsiback.c   Tue Jul 01 16:51:11 2014 +0200
@@ -92,7 +92,7 @@ void scsiback_fast_flush_area(pending_re
                        handle = pending_handle(req, i);
                        if (handle == SCSIBACK_INVALID_HANDLE)
-                       gnttab_set_unmap_op(&unmap[i], vaddr(req, i),
+                       gnttab_set_unmap_op(&unmap[invcount], vaddr(req, i),
                                                GNTMAP_host_map, handle);
                        pending_handle(req, i) = SCSIBACK_INVALID_HANDLE;

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.