]> Git Repo - qemu.git/commitdiff
sd: Mark brittle abuse of blk_attach_dev() FIXME
authorMarkus Armbruster <[email protected]>
Mon, 7 Dec 2015 15:55:10 +0000 (16:55 +0100)
committerPeter Maydell <[email protected]>
Mon, 7 Dec 2015 17:13:10 +0000 (17:13 +0000)
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 <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Message-id: 1449503710[email protected]
Signed-off-by: Peter Maydell <[email protected]>
hw/sd/sd.c

index ce4d44be91505100da02ba7b70ff066c8e0c8ba2..1a9935cf916fc8d7febfd95c68e2587cb792cdd0 100644 (file)
@@ -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);
     }
This page took 0.031126 seconds and 4 git commands to generate.