[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in ped_disk_new(). needs_clobber should be set to 1 before reading p
Bug in ped_disk_new(). needs_clobber should be set to 1 before reading partition table.
Thu, 4 Aug 2011 12:26:07 +0530 (IST)
I am using libparted version 1.8.8. Yes, this is an old version but I cannot
upgrade to higher versions at present.
There seems to be a bug in function ped_disk_new(). ped_disk_new() calls
ped_disk_new_fresh() that sets needs_clobbber = 1.
Then it calls, type->ops->read(disk). If the device has gpt partition table,
gpt_read() will be called. gpt_read() on finding that the partition table is
corrupt, will try to correct the partition table. So, if calls
ped_disk_commit_to_dev() checks if disk->needs_clobber is set, will try to
remove all known partition table signatures. This is dangerous as we are
reading the gpt partition table and at the same time trying to remove all
signatures of supported partition tables (in case of corrupted partition
tabel). This may lead to loss of data.
I think that in ped_disk_new(), needs_clobber should be set to 1 before reading
the partition table. Does this sound OK ?
Any help is highly appreciated.
|[Prev in Thread]
||[Next in Thread]|
- Bug in ped_disk_new(). needs_clobber should be set to 1 before reading partition table.,
rahul dev <=