[Top][All Lists]

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

[Qemu-commits] [qemu/qemu] 87ab88: block: Fix in_flight leak in request

From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 87ab88: block: Fix in_flight leak in request padding error...
Date: Wed, 04 Aug 2021 01:33:02 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 87ab88025247b893aad5071fd38301b67be76d1a
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2021-08-03 (Tue, 03 Aug 2021)

  Changed paths:
    M block/io.c

  Log Message:
  block: Fix in_flight leak in request padding error path

When bdrv_pad_request() fails in bdrv_co_preadv_part(), bs->in_flight
has been increased, but is never decreased again. This leads to a hang
when trying to drain the block node.

This bug was observed with Windows guests which issue a request that
fully uses IOV_MAX during installation, so that when padding is
necessary (O_DIRECT with a 4k sector size block device on the host),
adding another entry causes failure.

Call bdrv_dec_in_flight() to fix this. There is a larger problem to
solve here because this request shouldn't even fail, but Windows doesn't
seem to care and with this minimal fix the installation succeeds. So
given that we're already in freeze, let's take this minimal fix for 6.1.

Fixes: 98ca45494fcd6bf0336ecd559e440b6de6ea4cd3
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1972079
Reported-by: Qing Wang <qinwang@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20210727154923.91067-1-kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

  Commit: ef6607edf005dc5e52f60e7e1beea49bf2d48a00
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-08-04 (Wed, 04 Aug 2021)

  Changed paths:
    M block/io.c

  Log Message:
  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block layer patches

- Fix hang after request padding error (Windows + 512-on-4k emulation)

# gpg: Signature made Tue 03 Aug 2021 15:40:10 BST
# gpg:                using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg:                issuer "kwolf@redhat.com"
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full]
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream:
  block: Fix in_flight leak in request padding error path

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

Compare: https://github.com/qemu/qemu/compare/cb2f4b8750b7...ef6607edf005

reply via email to

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