aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-12-07 16:55:10 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-12-07 17:13:10 +0000
commitba306c7a55a2fcdb51c279612f0f8fbd9a24a7ba (patch)
treefe0ad33cdcc7533b7876866a6ecd246af31fd28d /hw
parent79f21707898aaeebb070cb7301846562b77e6fbf (diff)
downloadqemu-ba306c7a55a2fcdb51c279612f0f8fbd9a24a7ba.zip
qemu-ba306c7a55a2fcdb51c279612f0f8fbd9a24a7ba.tar.gz
qemu-ba306c7a55a2fcdb51c279612f0f8fbd9a24a7ba.tar.bz2
sd: Mark brittle abuse of blk_attach_dev() FIXME
blk_attach_dev() fails here only when we're working for device "sdhci-pci" (which already attached the backend), and then we don't want to attach a second time. If we ever create another failure mode, we're setting up ourselves to using the same backend from multiple frontends, which is likely to end in tears. Can't clean this up this close to the release, so mark it FIXME. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1449503710-3707-3-git-send-email-armbru@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/sd/sd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index ce4d44b..1a9935c 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -494,6 +494,7 @@ SDState *sd_init(BlockBackend *blk, bool is_spi)
if (sd->blk) {
/* Attach dev if not already attached. (This call ignores an
* error return code if sd->blk is already attached.) */
+ /* FIXME ignoring blk_attach_dev() failure is dangerously brittle */
blk_attach_dev(sd->blk, sd);
blk_set_dev_ops(sd->blk, &sd_block_ops, sd);
}