[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-commits
Subject:    [Qemu-commits] [qemu/qemu] caeadb: ide: fix invalid TRIM range abortion for macio
From:       GitHub <noreply () github ! com>
Date:       2018-03-27 16:11:09
Message-ID: 5aba6d1da2a33_8632abe5c771c0421797 () hookshot-fe-da92815 ! cp1-iad ! github ! net ! mail
[Download RAW message or body]


  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: caeadbc8ba4227f56957203fff0e4058eeb5f1b0
      https://github.com/qemu/qemu/commit/caeadbc8ba4227f56957203fff0e4058eeb5f1b0
  Author: Anton Nefedov <anton.nefedov@virtuozzo.com>
  Date:   2018-03-27 (Tue, 27 Mar 2018)

  Changed paths:
    M hw/ide/core.c

  Log Message:
  -----------
  ide: fix invalid TRIM range abortion for macio

commit 947858b0 "ide: abort TRIM operation for invalid range"
is incorrect for macio; just ide_dma_error() without doing a callback
is not enough for that errorpath.

Instead, pass -EINVAL to the callback and handle it there
(see related motivation for read/write in 58ac32113).

It will however catch possible EINVAL from the block layer too.

Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id: 1520010495-58172-1-git-send-email-anton.nefedov@virtuozzo.com
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: eb69953ecb1cbe7b4c4093a97a4dab3daa315d4e
      https://github.com/qemu/qemu/commit/eb69953ecb1cbe7b4c4093a97a4dab3daa315d4e
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2018-03-27 (Tue, 27 Mar 2018)

  Changed paths:
    M hw/ide/macio.c

  Log Message:
  -----------
  macio: fix NULL pointer dereference when issuing IDE trim

Commit ef0e64a983 "ide: pass IDEState to trim AIO callback" changed the
IDE trim callback from using a BlockBackend to an IDEState but forgot to update
the dma_blk_io() call in hw/ide/macio.c accordingly.

Without this fix qemu-system-ppc segfaults when issuing an IDE trim command on
any of the PPC Mac machines (easily triggered by running the Debian installer).

Reported-by: Howard Spoelstra <hsp.cat7@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
Message-id: 20180223184700.28854-1-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>


  Commit: dfe732fb68ef9195517f4f380a477d58a054edc1
      https://github.com/qemu/qemu/commit/dfe732fb68ef9195517f4f380a477d58a054edc1
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2018-03-27 (Tue, 27 Mar 2018)

  Changed paths:
    M hw/ide/core.c
    M hw/ide/macio.c

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

# gpg: Signature made Tue 27 Mar 2018 05:56:19 BST
# gpg:                using RSA key 7DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>"
# Primary key fingerprint: FAEB 9711 A12C F475 812F  18F2 88A9 064D 1835 61EB
#      Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76  CBD0 7DEF 8106 AAFC 390E

* remotes/jnsnow/tags/ide-pull-request:
  macio: fix NULL pointer dereference when issuing IDE trim
  ide: fix invalid TRIM range abortion for macio

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


Compare: https://github.com/qemu/qemu/compare/62d028966274...dfe732fb68ef

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic