[gparted] Fix gparted scans forever blank disk in virtual machine (#697518)
- From: Mike Fleetwood <mfleetwo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Fix gparted scans forever blank disk in virtual machine (#697518)
- Date: Fri, 19 Apr 2013 17:02:33 +0000 (UTC)
commit 51b8e241bcf674cde34495df9b0af07ffcdf9ac2
Author: Curtis Gedak <gedakc gmail com>
Date: Thu Apr 18 13:20:05 2013 -0600
Fix gparted scans forever blank disk in virtual machine (#697518)
In some circumstances gparted would appear to scan forever if it
encountered a blank hard disk. This would happen if the timing of
events was right and gparted encountered a disk without a partition
table. The missing partition table would cause a call to the
exception handler, which could get stuck in a thread waiting position.
The problem was traced back to the ped_exception_handler
and a cond.signal() call missing the requisite mutex.lock() and
mutex.unlock() around the signal call.
Closes Bug #697518 - gparted scans forever blank disk in virtualbox
src/GParted_Core.cc | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 40d5b54..515ab9e 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -3502,7 +3502,9 @@ static bool _ped_exception_handler( struct ped_exception_ctx *ctx )
if( optcount == 1 && ctx->e->type != PED_EXCEPTION_BUG && ctx->e->type != PED_EXCEPTION_FATAL )
{
ctx->ret = (PedExceptionOption)opt;
+ ctx->mutex.lock();
ctx->cond.signal();
+ ctx->mutex.unlock();
return false;
}
PedExceptionMsg msg( *ctx->e );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]