]> Git Repo - qemu.git/commit
backup-top: Refuse I/O in inactive state
authorMax Reitz <[email protected]>
Fri, 19 Feb 2021 15:33:47 +0000 (16:33 +0100)
committerKevin Wolf <[email protected]>
Mon, 8 Mar 2021 13:55:18 +0000 (14:55 +0100)
commit705dde27c6c53b73d2aa139b5b2a0ea490153e5b
tree8c8115d08239512606b60bea463ad061429299f6
parentbdc4c4c5e372756a5ba3fb3a61e585b02f0dd7f4
backup-top: Refuse I/O in inactive state

When the backup-top node transitions from active to inactive in
bdrv_backup_top_drop(), the BlockCopyState is freed and the filtered
child is removed, so the node effectively becomes unusable.

However, noone told its I/O functions this, so they will happily
continue accessing bs->backing and s->bcs.  Prevent that by aborting
early when s->active is false.

(After the preceding patch, the node should be gone after
bdrv_backup_top_drop(), so this should largely be a theoretical problem.
But still, better to be safe than sorry, and also I think it just makes
sense to check s->active in the I/O functions.)

Signed-off-by: Max Reitz <[email protected]>
Message-Id: <20210219153348[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/backup-top.c
This page took 0.026073 seconds and 4 git commands to generate.