[CC'ing Pekka] Paul, On Tue, Aug 14, 2012 at 1:11 AM, Paul Neumann <paul104x@xxxxxxxx> wrote: > The errors from kvm_cmd_run_init() are not handled properly as they are > returned as positive values. > > Signed-off-by: Paul Neumann <paul104x@xxxxxxxx> Looks good to me. Paul, can you tell how the segfault is triggered as well? Thanks. > --- > tools/kvm/builtin-run.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c > index a36bd00..47c6634 100644 > --- a/tools/kvm/builtin-run.c > +++ b/tools/kvm/builtin-run.c > @@ -952,7 +952,7 @@ static int kvm_cmd_run_init(int argc, const char **argv) > fprintf(stderr, "Cannot handle parameter: " > "%s\n", argv[0]); > usage_with_options(run_usage, options); > - return EINVAL; > + return -EINVAL; > } > if (kvm_run_wrapper == KVM_RUN_SANDBOX) { > /* > @@ -979,7 +979,7 @@ static int kvm_cmd_run_init(int argc, const char **argv) > > if (!kernel_filename) { > kernel_usage_with_options(); > - return EINVAL; > + return -EINVAL; > } > > vmlinux_filename = find_vmlinux(); > -- > 1.7.11.4 > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Asias He -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html