瀏覽代碼

hw/9pfs: Fix crash when mounting with synthfs

Some Fsdriver backend don't have fs_root. So check for that in
migrate message.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Aneesh Kumar K.V 13 年之前
父節點
當前提交
71f86cd6f3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hw/9pfs/virtio-9p.c

+ 1 - 1
hw/9pfs/virtio-9p.c

@@ -986,7 +986,7 @@ static void v9fs_attach(void *opaque)
     s->root_fid = fid;
     /* disable migration */
     error_set(&s->migration_blocker, QERR_VIRTFS_FEATURE_BLOCKS_MIGRATION,
-              s->ctx.fs_root, s->tag);
+              s->ctx.fs_root ? s->ctx.fs_root : "NULL", s->tag);
     migrate_add_blocker(s->migration_blocker);
 out:
     put_fid(pdu, fidp);