]> git.proxmox.com Git - pve-qemu.git/commit
fix #2874: SATA: avoid unsolicited write to sector 0 during reset
authorFiona Ebner <f.ebner@proxmox.com>
Thu, 24 Aug 2023 13:51:11 +0000 (15:51 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 26 Sep 2023 09:30:22 +0000 (11:30 +0200)
commit816077299c92b2e20b692548c7ec40c9759963cf
treeb200632533af5ff2be15dd3cf6c687009a8e439a
parentef3308db717b00df6dfc25495a6263703fa84d67
fix #2874: SATA: avoid unsolicited write to sector 0 during reset

If there is a pending DMA operation during ide_bus_reset(), the fact
that the IDEstate is already reset before the operation is canceled
can be problematic. In particular, ide_dma_cb() might be called and
then use the reset IDEstate which contains the signature after the
reset. When used to construct the IO operation this leads to
ide_get_sector() returning 0 and nsector being 1. This is particularly
bad, because a write command will thus destroy the first sector which
often contains a partition table or similar.

Upstream discussion:
https://lists.nongnu.org/archive/html/qemu-devel/2023-08/msg04239.html

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
debian/patches/extra/0012-hw-ide-reset-cancel-async-DMA-operation-before-reset.patch [new file with mode: 0644]
debian/patches/series