qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] caeadb: ide: fix invalid TRIM range abortion


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] caeadb: ide: fix invalid TRIM range abortion for macio
Date: Tue, 27 Mar 2018 09:11:09 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: caeadbc8ba4227f56957203fff0e4058eeb5f1b0
      
https://github.com/qemu/qemu/commit/caeadbc8ba4227f56957203fff0e4058eeb5f1b0
  Author: Anton Nefedov <address@hidden>
  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 <address@hidden>
Tested-by: Mark Cave-Ayland <address@hidden>
Message-id: address@hidden
Signed-off-by: John Snow <address@hidden>


  Commit: eb69953ecb1cbe7b4c4093a97a4dab3daa315d4e
      
https://github.com/qemu/qemu/commit/eb69953ecb1cbe7b4c4093a97a4dab3daa315d4e
  Author: Mark Cave-Ayland <address@hidden>
  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 <address@hidden>
Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Anton Nefedov <address@hidden>
Message-id: address@hidden
Signed-off-by: John Snow <address@hidden>


  Commit: dfe732fb68ef9195517f4f380a477d58a054edc1
      
https://github.com/qemu/qemu/commit/dfe732fb68ef9195517f4f380a477d58a054edc1
  Author: Peter Maydell <address@hidden>
  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) <address@hidden>"
# 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 <address@hidden>


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

reply via email to

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