Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1241470

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

Path csiph.com!goblin3!goblin2!goblin.stu.neva.ru!aioe.org!bofh.it!news.nic.it!robomod
From Julien Grall <julien.grall@citrix.com>
Newsgroups linux.kernel
Subject [PATCH] xen/balloon: Use the correct sizeof when declaring frame_list
Date Wed, 07 Oct 2015 15:10:02 +0200
Message-ID <qgWDM-5In-21@gated-at.bofh.it> (permalink)
X-Original-To <xen-devel@lists.xenproject.org>
X-Ironport-Av E=Sophos;i="5.17,649,1437436800"; d="scan'208";a="308640409"
X-Mailer git-send-email 2.1.4
MIME-Version 1.0
Content-Type text/plain
X-Dlp MIA1
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 42
Organization linux.* mail to news gateway
X-Original-Cc <ian.campbell@citrix.com>, <linux-kernel@vger.kernel.org>, Julien Grall <julien.grall@citrix.com>, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, David Vrabel <david.vrabel@citrix.com>
X-Original-Date Wed, 7 Oct 2015 14:04:33 +0100
X-Original-Message-ID <1444223073-2572-1-git-send-email-julien.grall@citrix.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1241470

Show key headers only | View raw


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>

----

Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
---
 drivers/xen/balloon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index b50d229..12eab50 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -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. */
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] xen/balloon: Use the correct sizeof when declaring frame_list Julien Grall <julien.grall@citrix.com> - 2015-10-07 15:10 +0200
  Re: [Xen-devel] [PATCH] xen/balloon: Use the correct sizeof when  declaring frame_list David Vrabel <david.vrabel@citrix.com> - 2015-10-07 18:20 +0200

csiph-web