Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Hering <ohering@suse.de>2013-07-19 16:39:26 +0200
committerOlaf Hering <ohering@suse.de>2013-07-19 16:39:31 +0200
commitdd2cffed48d1cd67f182e19fdf2b06b469715bcc (patch)
tree08b14eeef588a04fe85958fc7034904aaa26b9ef
parentaf855fc8527e21dd06eee74f1d3aae9927a9ee47 (diff)
Drivers: hv: balloon: Fix a bug in the hot-add code
-rw-r--r--patches.suse/suse-hv-Drivers-hv-balloon-Fix-a-bug-in-the-hot-add-code.patch52
-rw-r--r--series.conf1
2 files changed, 53 insertions, 0 deletions
diff --git a/patches.suse/suse-hv-Drivers-hv-balloon-Fix-a-bug-in-the-hot-add-code.patch b/patches.suse/suse-hv-Drivers-hv-balloon-Fix-a-bug-in-the-hot-add-code.patch
new file mode 100644
index 0000000000..e958ff05f9
--- /dev/null
+++ b/patches.suse/suse-hv-Drivers-hv-balloon-Fix-a-bug-in-the-hot-add-code.patch
@@ -0,0 +1,52 @@
+From: "K. Y. Srinivasan" <kys@microsoft.com>
+Date: Sun, 14 Jul 2013 22:38:11 -0700
+Patch-mainline: <submitted lkml 2013-07-14>
+Subject: Drivers: hv: balloon: Fix a bug in the hot-add code
+References: bnc#829539
+
+As we hot-add 128 MB chunks of memory, we wait to ensure that the memory
+is onlined before attempting to hot-add the next chunk. If the udev rule for
+memory hot-add is not executed within the allowed time, we would rollback the
+state and abort further hot-add. Since the hot-add has succeeded and the only
+failure is that the memory is not onlined within the allowed time, we should not
+be rolling back the state. Fix this bug.
+
+Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
+Cc: Stable <stable@vger.kernel.org>
+Acked-by: <ohering@suse.de>
+---
+ drivers/hv/hv_balloon.c | 13 +++++--------
+ 1 file changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
+index 4c605c7..61b7351 100644
+--- a/drivers/hv/hv_balloon.c
++++ b/drivers/hv/hv_balloon.c
+@@ -562,7 +562,7 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size,
+ struct hv_hotadd_state *has)
+ {
+ int ret = 0;
+- int i, nid, t;
++ int i, nid;
+ unsigned long start_pfn;
+ unsigned long processed_pfn;
+ unsigned long total_pfn = pfn_count;
+@@ -607,14 +607,11 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size,
+
+ /*
+ * Wait for the memory block to be onlined.
++ * Since the hot add has succeeded, it is ok to
++ * proceed even if the pages in the hot added region
++ * have not been "onlined" within the allowed time.
+ */
+- t = wait_for_completion_timeout(&dm_device.ol_waitevent, 5*HZ);
+- if (t == 0) {
+- pr_info("hot_add memory timedout\n");
+- has->ha_end_pfn -= HA_CHUNK;
+- has->covered_end_pfn -= processed_pfn;
+- break;
+- }
++ wait_for_completion_timeout(&dm_device.ol_waitevent, 5*HZ);
+
+ }
+
diff --git a/series.conf b/series.conf
index 2f2ae109b4..10071a2480 100644
--- a/series.conf
+++ b/series.conf
@@ -238,6 +238,7 @@
# Suse specific stuff
########################################################
patches.suse/suse-hv-Drivers-hv-util-Fix-a-bug-in-version-negotiation-cod.patch
+ patches.suse/suse-hv-Drivers-hv-balloon-Fix-a-bug-in-the-hot-add-code.patch
########################################################
# Networking, IPv6