qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] e02d94: dataplane/xen-block: remove dead code


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] e02d94: dataplane/xen-block: remove dead code
Date: Fri, 01 Mar 2019 03:19:53 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: e02d94941d9c26035d5c2e5075c83afbe8c5eaef
      
https://github.com/qemu/qemu/commit/e02d94941d9c26035d5c2e5075c83afbe8c5eaef
  Author: Paul Durrant <address@hidden>
  Date:   2019-02-28 (Thu, 28 Feb 2019)

  Changed paths:
    M hw/block/dataplane/xen-block.c

  Log Message:
  -----------
  dataplane/xen-block: remove dead code

The if() statement is clearly bogus (dead code which should have been
cleaned up when grant mapping was removed).

Spotted by Coverity: CID 1398635

While in the neighbourhood, add a missing 'fall through' annotation.

Reported-by: Peter Maydell <address@hidden>
Signed-off-by: Paul Durrant <address@hidden>
Acked-by: Anthony PERARD <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Anthony PERARD <address@hidden>


  Commit: 210b9776376698c50060e5383ccfac1170ae01a2
      
https://github.com/qemu/qemu/commit/210b9776376698c50060e5383ccfac1170ae01a2
  Author: Paul Durrant <address@hidden>
  Date:   2019-02-28 (Thu, 28 Feb 2019)

  Changed paths:
    M hw/block/xen-block.c

  Log Message:
  -----------
  xen-block: remove redundant assignment

The assignment to 'p' is unnecessary as the code will either goto 'invalid'
or p will get overwritten.

Spotted by Coverity: CID 1398638

Reported-by: Peter Maydell <address@hidden>
Signed-off-by: Paul Durrant <address@hidden>
Acked-by: Anthony PERARD <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Anthony PERARD <address@hidden>


  Commit: 2ae23f0ecf002203977b7337219e2413abd656ec
      
https://github.com/qemu/qemu/commit/2ae23f0ecf002203977b7337219e2413abd656ec
  Author: Paul Durrant <address@hidden>
  Date:   2019-02-28 (Thu, 28 Feb 2019)

  Changed paths:
    M hw/block/xen-block.c

  Log Message:
  -----------
  xen-block: report error condition from vbd_name_to_disk()

The function needs to make sure it is passed a valid disk name. This is
easily done by making sure that the parsing loop results in a non-zero
value.

Spotted by Coverity: CID 1398640

Reported-by: Peter Maydell <address@hidden>
Signed-off-by: Paul Durrant <address@hidden>
Acked-by: Anthony PERARD <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Anthony PERARD <address@hidden>


  Commit: 156ac94463b42b0b9beea263af9866dfcd3683e0
      
https://github.com/qemu/qemu/commit/156ac94463b42b0b9beea263af9866dfcd3683e0
  Author: Paul Durrant <address@hidden>
  Date:   2019-02-28 (Thu, 28 Feb 2019)

  Changed paths:
    M hw/block/xen-block.c

  Log Message:
  -----------
  xen-block: stop leaking memory in xen_block_drive_create()

The locally allocated QDict-s need to be freed. ('file_layer' will be
freed implicitly since it is added as an object to 'driver_layer').

Spotted by Coverity: CID 1398649

While in the neighbourhood free 'driver' and 'filename' as soon as they are
added to the QDicts. Freeing after the 'done' label doesn't make that much
sense as, if the error path jumps to that label, the values would be NULL
anyway.

This patch also makes that more obvious by taking the error path if
'params' is NULL and then asserting that both driver and filename are
non-NULL in the normal path.

Reported-by: Peter Maydell <address@hidden>
Signed-off-by: Paul Durrant <address@hidden>
Message-Id: <address@hidden>
Acked-by: Anthony PERARD <address@hidden>
Signed-off-by: Anthony PERARD <address@hidden>


  Commit: f0ce2e17cdd015e8193c0ad71e2d5a7de72f0cfc
      
https://github.com/qemu/qemu/commit/f0ce2e17cdd015e8193c0ad71e2d5a7de72f0cfc
  Author: Peter Maydell <address@hidden>
  Date:   2019-03-01 (Fri, 01 Mar 2019)

  Changed paths:
    M hw/block/dataplane/xen-block.c
    M hw/block/xen-block.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20190228' into 
staging

Xen queue

* xen-block fixes

# gpg: Signature made Thu 28 Feb 2019 17:31:05 GMT
# gpg:                using RSA key F80C006308E22CFD8A92E7980CF5572FD7FB55AF
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Anthony PERARD <address@hidden>" [marginal]
# gpg:                 aka "Anthony PERARD <address@hidden>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 5379 2F71 024C 600F 778A  7161 D8D5 7199 DF83 42C8
#      Subkey fingerprint: F80C 0063 08E2 2CFD 8A92  E798 0CF5 572F D7FB 55AF

* remotes/aperard/tags/pull-xen-20190228:
  xen-block: stop leaking memory in xen_block_drive_create()
  xen-block: report error condition from vbd_name_to_disk()
  xen-block: remove redundant assignment
  dataplane/xen-block: remove dead code

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


Compare: https://github.com/qemu/qemu/compare/de5be3fe1615...f0ce2e17cdd0



reply via email to

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