xen/balloon: Use the correct sizeof when declaring frame_list
authorJulien Grall <julien.grall@citrix.com>
Wed, 7 Oct 2015 13:04:33 +0000 (14:04 +0100)
committerDavid Vrabel <david.vrabel@citrix.com>
Fri, 23 Oct 2015 13:20:44 +0000 (14:20 +0100)
The type of the item in frame_list is xen_pfn_t which is not an unsigned
long on ARM but an uint64_t.

With the current computation, the size of frame_list will be 2 *
PAGE_SIZE rather than PAGE_SIZE.

I bet it's just mistake when the type has been switched from "unsigned
long" to "xen_pfn_t" in commit 965c0aaafe3e75d4e65cd4ec862915869bde3abd
"xen: balloon: use correct type for frame_list".

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
drivers/xen/balloon.c

index b50d22960ce7cc3e3217e7b933a837b45a36a2dd..12eab503efd1bb8793fff55eca83649e1f564426 100644 (file)
@@ -141,7 +141,7 @@ struct balloon_stats balloon_stats;
 EXPORT_SYMBOL_GPL(balloon_stats);
 
 /* We increase/decrease in batches which fit in a page */
-static xen_pfn_t frame_list[PAGE_SIZE / sizeof(unsigned long)];
+static xen_pfn_t frame_list[PAGE_SIZE / sizeof(xen_pfn_t)];
 
 
 /* List of ballooned pages, threaded through the mem_map array. */