]> Git Repo - qemu.git/commit - scsi/pr-manager-helper.c
pr-manager-helper: avoid SIGSEGV when writing to the socket fail
authorPaolo Bonzini <[email protected]>
Tue, 26 Jun 2018 13:39:18 +0000 (15:39 +0200)
committerPaolo Bonzini <[email protected]>
Thu, 28 Jun 2018 17:05:35 +0000 (19:05 +0200)
commitaad10040d411d21542dc9ae58a2854c89ccedd78
tree22f095148df48091b0b7633a5a9884028804ec29
parent86933b4e7879e427e03365bf352c0964640cb37b
pr-manager-helper: avoid SIGSEGV when writing to the socket fail

When writing to the qemu-pr-helper socket failed, the persistent
reservation manager was correctly disconnecting the socket, but it
did not clear pr_mgr->ioc.  So the rest of the code did not know
that the socket had been disconnected, accessed pr_mgr->ioc and
happily caused a crash.

To reproduce, it is enough to stop qemu-pr-helper between QEMU
startup and executing e.g. sg_persist -k /dev/sdb.

Reviewed-by: Michal Privoznik <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
scsi/pr-manager-helper.c
This page took 0.02542 seconds and 4 git commands to generate.