Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Q qemu
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • Xing Lin
  • qemu
  • Repository
Switch branch/tag
  • qemu
  • block.c
Find file BlameHistoryPermalink
  • Kevin Wolf's avatar
    block: Fix direct use of protocols as driver for bdrv_open() · 5d186eb0
    Kevin Wolf authored Mar 27, 2013
    
    
    bdrv_open_common() implements direct use of protocols by copying the
    pre-opened BlockDriverStates to bs using bdrv_swap(). It did however
    first set some fields in bs, which end up in file after the swap. When
    bdrv_open() destroys file, it appears to be open, and because it isn't,
    qemu could segfault while trying to close it.
    
    Reorder the operations to return immediately in such cases so that file
    is correctly detected as closed.
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    5d186eb0

Replace block.c

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.