qemu-e2k/hw
Prasad J Pandit 4ab0359a8a ide: ahci: reset ncq object to unused on error
When processing NCQ commands, AHCI device emulation prepares a
NCQ transfer object; To which an aio control block(aiocb) object
is assigned in 'execute_ncq_command'. In case, when the NCQ
command is invalid, the 'aiocb' object is not assigned, and NCQ
transfer object is left as 'used'. This leads to a use after
free kind of error in 'bdrv_aio_cancel_async' via 'ahci_reset_port'.
Reset NCQ transfer object to 'unused' to avoid it.

[Maintainer edit: s/ACHI/AHCI/ in the commit message. --js]

Reported-by: Qinghao Tang <luodalongde@gmail.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 1452282511-4116-1-git-send-email-ppandit@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2016-01-11 14:10:42 -05:00
..
9pfs
acpi trivial patches for 2016-01-11 2016-01-11 12:56:58 +00:00
alpha
arm hw/arm/virt: Support legacy -nic command line syntax 2016-01-11 16:04:50 +00:00
audio
block
bt
char
core hw/core/qdev: Remove superfluous return statement 2016-01-11 11:39:28 +03:00
cpu
cris
display
dma hw/dma/xilinx_axidma: remove dead code 2016-01-11 15:52:18 +00:00
gpio
i2c
i386 i386/pc: expose identifying the floppy controller 2016-01-09 23:20:20 +02:00
ide ide: ahci: reset ncq object to unused on error 2016-01-11 14:10:42 -05:00
input
intc
ipack
ipmi
isa
lm32
m68k
mem
microblaze
mips gt64120: convert to realize() 2016-01-11 11:39:28 +03:00
misc i.MX: move i.MX31 CCM object to register array 2016-01-11 15:52:18 +00:00
moxie
net ether/slirp: Avoid redefinition of the same constants 2016-01-11 11:01:35 +08:00
nvram
openrisc
pci
pci-bridge
pci-host trivial patches for 2016-01-11 2016-01-11 12:56:58 +00:00
pcmcia
ppc hw/ppc/spapr: fix spapr->kvm_type leak 2016-01-11 15:29:05 +11:00
s390x hw/s390x: Remove superfluous return statements 2016-01-11 11:39:28 +03:00
scsi
sd
sh4 SH PCI Host: convert to realize() 2016-01-11 11:39:28 +03:00
smbios
sparc
sparc64
ssi
timer
tpm
tricore
unicore32
usb
vfio
virtio virtio: fix error message for number of queues 2016-01-09 23:20:20 +02:00
watchdog
xen xen/Makefile.objs: simplify 2016-01-11 11:39:28 +03:00
xenpv
xtensa
Makefile.objs