Skip to contentSkip to conversation

xen/balloon: Use the correct sizeof when declaring frame_list

PATCH Applied Julien Grall 2 participants 3 messages Oct 7, 2015 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/balloon: Use the correct sizeof when declaring frame_list

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".

----

Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Boris Ostrovsky <[email protected]>
Cc David Vrabel <[email protected]>
---
 drivers/xen/balloon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/balloon.c +1 -1
index b50d229..12eab50 100644
@@ -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. */
Signature · 1 line
2.1.4
Applied
#1 lore raw
Quoted 2 lines · Julien Grall

The type of the item in frame_list is xen_pfn_t which is not an unsigned long on ARM but an uint64_t.

Applied to for-linus-4.4, thanks.

David

Applied
#2 lore raw
In reply to Julien Grall
Quoted 2 lines · Julien Grall

The type of the item in frame_list is xen_pfn_t which is not an unsigned long on ARM but an uint64_t.

Applied to for-linus-4.4, thanks.

David