[tip:tools/kvm] kvm tools: ignore balloon signals by default to avoid balloon crash

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

 



Commit-ID:  1de72fe1569c6154f46471e6cebac8b99d41c368
Gitweb:     http://git.kernel.org/tip/1de72fe1569c6154f46471e6cebac8b99d41c368
Author:     Liming Wang <walimisdev@xxxxxxxxx>
AuthorDate: Thu, 11 Aug 2011 15:28:10 +0800
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Thu, 11 Aug 2011 16:34:21 +0300

kvm tools: ignore balloon signals by default to avoid balloon crash

If "kvm run" without balloon option, use "kvm balloon" may
crash kvm. So ignore balloon signals by default to avoid this.

Signed-off-by: Liming Wang <walimisdev@xxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 tools/kvm/builtin-run.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
index fa5de27..1ab7122 100644
--- a/tools/kvm/builtin-run.c
+++ b/tools/kvm/builtin-run.c
@@ -469,6 +469,9 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix)
 	signal(SIGUSR2, handle_sigusr2);
 	signal(SIGKVMSTOP, handle_sigstop);
 	signal(SIGKVMRESUME, handle_sigusr2);
+	/* ignore balloon signal by default if not enable balloon optiion */
+	signal(SIGKVMADDMEM, SIG_IGN);
+	signal(SIGKVMDELMEM, SIG_IGN);
 
 	nr_online_cpus = sysconf(_SC_NPROCESSORS_ONLN);
 
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux