qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] a9859c: xilinx: Fix latent error handling bug


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] a9859c: xilinx: Fix latent error handling bug
Date: Fri, 14 Jul 2017 03:06:02 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a9859c90a5db200fd4f63ab2cdc973343348b9ef
      
https://github.com/qemu/qemu/commit/a9859c90a5db200fd4f63ab2cdc973343348b9ef
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-07-13 (Thu, 13 Jul 2017)

  Changed paths:
    M hw/dma/xilinx_axidma.c
    M hw/net/xilinx_axienet.c

  Log Message:
  -----------
  xilinx: Fix latent error handling bug

Assigning directly to *errp is not valid, as errp may be null,
&error_fatal, or &error_abort.  The !*errp conditional protects
against the latter two, but we then leak @local_err.  Fortunately,
the qdev core always passes pointer to null, so this is "merely" a
latent bug.

Use error_propagate() instead.

Cc: "Edgar E. Iglesias" <address@hidden>
Cc: Alistair Francis <address@hidden>
Cc: Jason Wang <address@hidden>
Cc: address@hidden
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
[Commit message clarified]
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 57ef3f1278585fbac5f6102362d3c5e066976fdc
      
https://github.com/qemu/qemu/commit/57ef3f1278585fbac5f6102362d3c5e066976fdc
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-07-13 (Thu, 13 Jul 2017)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Don't try to set *errp directly

Assigning directly to *errp is not valid, as errp may be NULL,
&error_fatal, or &error_abort.  Use error_propagate() instead.

With this, there's no need to check if errp is NULL anymore, as
error_propagate() and error_prepend() are able to handle that.

Cc: Kevin Wolf <address@hidden>
Cc: Max Reitz <address@hidden>
Cc: address@hidden
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: e79ea67a9785a5da4d1889b6e2bb71d03e916add
      
https://github.com/qemu/qemu/commit/e79ea67a9785a5da4d1889b6e2bb71d03e916add
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-07-13 (Thu, 13 Jul 2017)

  Changed paths:
    M io/channel-websock.c

  Log Message:
  -----------
  websock: Don't try to set *errp directly

Assigning directly to *errp is not valid, as errp may be NULL,
&error_fatal, or &error_abort.  Use error_propagate() instead.

Cc: "Daniel P. Berrange" <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Manos Pitsidianakis <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: beeb175c0db29a4be13625c3e53cf674c3be9267
      
https://github.com/qemu/qemu/commit/beeb175c0db29a4be13625c3e53cf674c3be9267
  Author: Alistair Francis <address@hidden>
  Date:   2017-07-13 (Thu, 13 Jul 2017)

  Changed paths:
    M util/qemu-error.c

  Log Message:
  -----------
  util/qemu-error: Rename error_print_loc() to be more generic

Rename the error_print_loc() function in preparation for using it to
print warnings as well.

Signed-off-by: Alistair Francis <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 97f40301f1dc3a3658427d1e9d964007b6f5673b
      
https://github.com/qemu/qemu/commit/97f40301f1dc3a3658427d1e9d964007b6f5673b
  Author: Alistair Francis <address@hidden>
  Date:   2017-07-13 (Thu, 13 Jul 2017)

  Changed paths:
    M include/qemu/error-report.h
    M scripts/checkpatch.pl
    M util/qemu-error.c

  Log Message:
  -----------
  error: Functions to report warnings and informational messages

Add warn_report(), warn_vreport() for reporting warnings, and
info_report(), info_vreport() for informational messages.

These are implemented them with a helper function factored out of
error_vreport(), suitably generalized. This patch makes no changes
to the output of the original error_report() function.

Signed-off-by: Alistair Francis <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 3dc6f8693694a649a9c83f1e2746565b47683923
      
https://github.com/qemu/qemu/commit/3dc6f8693694a649a9c83f1e2746565b47683923
  Author: Alistair Francis <address@hidden>
  Date:   2017-07-13 (Thu, 13 Jul 2017)

  Changed paths:
    M block/backup.c
    M block/gluster.c
    M block/iscsi.c
    M block/nfs.c
    M block/rbd.c
    M block/ssh.c
    M blockdev.c
    M cpus.c
    M hw/9pfs/9p.c
    M hw/arm/highbank.c
    M hw/arm/imx25_pdk.c
    M hw/arm/kzm.c
    M hw/core/machine.c
    M hw/core/qdev-properties.c
    M hw/i386/acpi-build.c
    M hw/i386/kvm/pci-assign.c
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M hw/misc/aspeed_sdmc.c
    M hw/nvram/fw_cfg.c
    M hw/pci-host/piix.c
    M hw/ppc/pnv.c
    M hw/ppc/spapr.c
    M hw/ppc/spapr_iommu.c
    M hw/scsi/scsi-bus.c
    M hw/usb/dev-smartcard-reader.c
    M hw/usb/redirect.c
    M net/tap-linux.c
    M target/i386/cpu.c
    M target/i386/kvm.c
    M target/s390x/cpu_models.c
    M target/s390x/kvm.c
    M tests/test-qdev-global-props.c
    M trace/control.c
    M vl.c

  Log Message:
  -----------
  Convert error_report() to warn_report()

Convert all uses of error_report("warning:"... to use warn_report()
instead. This helps standardise on a single method of printing warnings
to the user.

All of the warnings were changed using these two commands:
    find ./* -type f -exec sed -i \
      's|error_report(".*warning[,:] |warn_report("|Ig' {} +

Indentation fixed up manually afterwards.

The test-qdev-global-props test case was manually updated to ensure that
this patch passes make check (as the test cases are case sensitive).

Signed-off-by: Alistair Francis <address@hidden>
Suggested-by: Thomas Huth <address@hidden>
Cc: Jeff Cody <address@hidden>
Cc: Kevin Wolf <address@hidden>
Cc: Max Reitz <address@hidden>
Cc: Ronnie Sahlberg <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Peter Lieven <address@hidden>
Cc: Josh Durgin <address@hidden>
Cc: "Richard W.M. Jones" <address@hidden>
Cc: Markus Armbruster <address@hidden>
Cc: Peter Crosthwaite <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: "Aneesh Kumar K.V" <address@hidden>
Cc: Greg Kurz <address@hidden>
Cc: Rob Herring <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Peter Chubb <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: David Gibson <address@hidden>
Cc: Alexander Graf <address@hidden>
Cc: Gerd Hoffmann <address@hidden>
Cc: Jason Wang <address@hidden>
Cc: Marcelo Tosatti <address@hidden>
Cc: Christian Borntraeger <address@hidden>
Cc: Cornelia Huck <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Acked-by: David Gibson <address@hidden>
Acked-by: Greg Kurz <address@hidden>
Acked-by: Cornelia Huck <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed by: Peter Chubb <address@hidden>
Acked-by: Max Reitz <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: c51c4f88072e7c598514a96d7e31b2a46520eca7
      
https://github.com/qemu/qemu/commit/c51c4f88072e7c598514a96d7e31b2a46520eca7
  Author: Alistair Francis <address@hidden>
  Date:   2017-07-13 (Thu, 13 Jul 2017)

  Changed paths:
    M chardev/char-socket.c

  Log Message:
  -----------
  char-socket: Report TCP socket waiting as information

When QEMU is waiting for a TCP socket connection it reports that message as
an error. This isn't an error it is just information so let's change the
report to use info_report() instead.

Signed-off-by: Alistair Francis <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: e43ead1d0b9c467af4a2af8f5177316a0ccb5602
      
https://github.com/qemu/qemu/commit/e43ead1d0b9c467af4a2af8f5177316a0ccb5602
  Author: Alistair Francis <address@hidden>
  Date:   2017-07-13 (Thu, 13 Jul 2017)

  Changed paths:
    M include/qapi/error.h
    M scripts/checkpatch.pl
    M util/error.c

  Log Message:
  -----------
  error: Implement the warn and free Error functions

Implement warn_report_err() and warn_reportf_err() functions which
are the same as the error_report_err() and error_reportf_err()
functions except report a warning instead of an error.

Signed-off-by: Alistair Francis <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 88f83f3539fdedd5f315c5fe434ffcb7a010cc73
      
https://github.com/qemu/qemu/commit/88f83f3539fdedd5f315c5fe434ffcb7a010cc73
  Author: Alistair Francis <address@hidden>
  Date:   2017-07-13 (Thu, 13 Jul 2017)

  Changed paths:
    M hw/core/qdev-properties.c
    M hw/i386/pc.c

  Log Message:
  -----------
  Convert error_report*_err() to warn_report*_err()

Convert all uses of error_report*_err("Warning:"... to use
warn_report*_err() instead. This helps standardise on a single
method of printing warnings to the user.

Signed-off-by: Alistair Francis <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: a309b290aaa8ac55191a50e44bbd99b5fc586487
      
https://github.com/qemu/qemu/commit/a309b290aaa8ac55191a50e44bbd99b5fc586487
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-14 (Fri, 14 Jul 2017)

  Changed paths:
    M block.c
    M block/backup.c
    M block/gluster.c
    M block/iscsi.c
    M block/nfs.c
    M block/rbd.c
    M block/ssh.c
    M blockdev.c
    M chardev/char-socket.c
    M cpus.c
    M hw/9pfs/9p.c
    M hw/arm/highbank.c
    M hw/arm/imx25_pdk.c
    M hw/arm/kzm.c
    M hw/core/machine.c
    M hw/core/qdev-properties.c
    M hw/dma/xilinx_axidma.c
    M hw/i386/acpi-build.c
    M hw/i386/kvm/pci-assign.c
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M hw/misc/aspeed_sdmc.c
    M hw/net/xilinx_axienet.c
    M hw/nvram/fw_cfg.c
    M hw/pci-host/piix.c
    M hw/ppc/pnv.c
    M hw/ppc/spapr.c
    M hw/ppc/spapr_iommu.c
    M hw/scsi/scsi-bus.c
    M hw/usb/dev-smartcard-reader.c
    M hw/usb/redirect.c
    M include/qapi/error.h
    M include/qemu/error-report.h
    M io/channel-websock.c
    M net/tap-linux.c
    M scripts/checkpatch.pl
    M target/i386/cpu.c
    M target/i386/kvm.c
    M target/s390x/cpu_models.c
    M target/s390x/kvm.c
    M tests/test-qdev-global-props.c
    M trace/control.c
    M util/error.c
    M util/qemu-error.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2017-07-13' into 
staging

Error reporting patches for 2017-07-13

# gpg: Signature made Thu 13 Jul 2017 12:55:45 BST
# gpg:                using RSA key 0x3870B400EB918653
# gpg: Good signature from "Markus Armbruster <address@hidden>"
# gpg:                 aka "Markus Armbruster <address@hidden>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-error-2017-07-13:
  Convert error_report*_err() to warn_report*_err()
  error: Implement the warn and free Error functions
  char-socket: Report TCP socket waiting as information
  Convert error_report() to warn_report()
  error: Functions to report warnings and informational messages
  util/qemu-error: Rename error_print_loc() to be more generic
  websock: Don't try to set *errp directly
  block: Don't try to set *errp directly
  xilinx: Fix latent error handling bug

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/49bcce4b9c11...a309b290aaa8

reply via email to

[Prev in Thread] Current Thread [Next in Thread]