Skip to content

Commit cd2f44c

Browse files
Don Slutzmdroth
authored andcommitted
hw/ide/core.c: Prevent SIGSEGV during migration
The other callers to blk_set_enable_write_cache() in this file already check for s->blk == NULL. Signed-off-by: Don Slutz <[email protected]> Reviewed-by: Paolo Bonzini <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Message-id: [email protected] Cc: [email protected] Signed-off-by: Peter Maydell <[email protected]> (cherry picked from commit 6b896ab) Conflicts: hw/ide/core.c *removed dependency on 4be7463 Signed-off-by: Michael Roth <[email protected]>
1 parent 8444701 commit cd2f44c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hw/ide/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2299,7 +2299,7 @@ static int ide_drive_post_load(void *opaque, int version_id)
22992299
{
23002300
IDEState *s = opaque;
23012301

2302-
if (s->identify_set) {
2302+
if (s->bs && s->identify_set) {
23032303
bdrv_set_enable_write_cache(s->bs, !!(s->identify_data[85] & (1 << 5)));
23042304
}
23052305
return 0;

0 commit comments

Comments
 (0)