qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 886188: hw/block/nvme: fix legacy namespace r


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 886188: hw/block/nvme: fix legacy namespace registration
Date: Thu, 11 Feb 2021 08:53:40 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 886188a9c11ff9518c8f20e265e7a98439c14d32
      
https://github.com/qemu/qemu/commit/886188a9c11ff9518c8f20e265e7a98439c14d32
  Author: Klaus Jensen <k.jensen@samsung.com>
  Date:   2021-02-11 (Thu, 11 Feb 2021)

  Changed paths:
    M hw/block/nvme.c

  Log Message:
  -----------
  hw/block/nvme: fix legacy namespace registration

Moving namespace registration to the nvme-ns realization function had
the unintended side-effect of breaking legacy namespace registration.
Fix this.

Fixes: 15d024d4aa9b ("hw/block/nvme: split setup and register for namespace")
Reported-by: Alexander Graf <agraf@csgraf.de>
Cc: Minwoo Im <minwoo.im.dev@gmail.com>
Tested-by: Alexander Graf <agraf@csgraf.de>
Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>


  Commit: 2132cfe52bd87f191887c1728190bf56e8d5275f
      
https://github.com/qemu/qemu/commit/2132cfe52bd87f191887c1728190bf56e8d5275f
  Author: Bin Meng <bin.meng@windriver.com>
  Date:   2021-02-11 (Thu, 11 Feb 2021)

  Changed paths:
    M hw/block/nvme.c

  Log Message:
  -----------
  hw/block/nvme: Fix a build error in nvme_get_feature()

Current QEMU HEAD nvme.c does not compile with the default GCC 5.4
on a Ubuntu 16.04 host:

  hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in this 
function [-Werror=maybe-uninitialized]
         trace_pci_nvme_getfeat_vwcache(result ? "enabled" : "disabled");
         ^
  hw/block/nvme.c:3150:14: note: ‘result’ was declared here
     uint32_t result;
              ^

Explicitly initialize the result to fix it.

Fixes: aa5e55e3b07e ("hw/block/nvme: open code for volatile write cache")
Fixes: Coverity CID 1446371
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>


  Commit: 832a59e43b5d8b8a9c2b2565008ebea1059d539d
      
https://github.com/qemu/qemu/commit/832a59e43b5d8b8a9c2b2565008ebea1059d539d
  Author: Klaus Jensen <k.jensen@samsung.com>
  Date:   2021-02-11 (Thu, 11 Feb 2021)

  Changed paths:
    M hw/block/nvme-ns.c

  Log Message:
  -----------
  hw/block/nvme: fix error handling in nvme_ns_realize

nvme_ns_realize passes errp to nvme_register_namespaces, but then try to
prepend errp with local_err.

Just remove the local_err and use errp directly.

Fixes: 15d024d4aa9b ("hw/block/nvme: split setup and register for namespace")
Cc: Minwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>


  Commit: c973f06521b07af0f82893b75a1d55562fffb4b5
      
https://github.com/qemu/qemu/commit/c973f06521b07af0f82893b75a1d55562fffb4b5
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-02-11 (Thu, 11 Feb 2021)

  Changed paths:
    M hw/block/nvme-ns.c
    M hw/block/nvme.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/nvme/tags/nvme-fixes-pull-request' into 
staging

Two small fixes for regressions reported by Alexander Graf and Bin Meng.

v2: spotted one bug in the error handling.

# gpg: Signature made Thu 11 Feb 2021 15:19:30 GMT
# gpg:                using RSA key 522833AA75E2DCE6A24766C04DE1AF316D4F0DE9
# gpg: Good signature from "Klaus Jensen <its@irrelevant.dk>" [unknown]
# gpg:                 aka "Klaus Jensen <k.jensen@samsung.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: DDCA 4D9C 9EF9 31CC 3468  4272 63D5 6FC5 E55D A838
#      Subkey fingerprint: 5228 33AA 75E2 DCE6 A247  66C0 4DE1 AF31 6D4F 0DE9

* remotes/nvme/tags/nvme-fixes-pull-request:
  hw/block/nvme: fix error handling in nvme_ns_realize
  hw/block/nvme: Fix a build error in nvme_get_feature()
  hw/block/nvme: fix legacy namespace registration

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/83339e21d05c...c973f06521b0



reply via email to

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