Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
parted.3441
0005-libparted-Remove-fdasd-geometry-code-from-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0005-libparted-Remove-fdasd-geometry-code-from-alloc_meta.patch of Package parted.3441
From c58f816ffbc0bc4eacfb57d492cbe3b7497ede9f Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" <bcl@redhat.com> Date: Mon, 11 Apr 2016 15:10:51 -0700 Subject: [PATCH] libparted: Remove fdasd geometry code from alloc_metadata (#1244833) commit db20944f changed how the trailing_metadata_end is calculated in dasd_alloc_metadata, removing the need for setting up the anchor struct. But dasd_alloc_metadata can be called in various contexts, and the arch_specific->fd may or may not be valid during these calls. This can result in unpredictable crashes when it uses a stale fd and tries to run the file image code in fdasd_get_geometry instead of the device code. The solution is to just drop the unneeded code, and to remember that arch_specific->fd should only be used when ped_device_open has first been called. Resolves: rhbz#1244833 --- libparted/labels/dasd.c | 4 ---- 1 file changed, 4 deletions(-) Index: parted-3.1/libparted/labels/dasd.c =================================================================== --- parted-3.1.orig/libparted/labels/dasd.c +++ parted-3.1/libparted/labels/dasd.c @@ -996,7 +996,6 @@ dasd_alloc_metadata (PedDisk* disk) PedPartition* part = NULL; /* initialize solely to placate gcc */ PedPartition* new_part2; PedSector trailing_meta_start, trailing_meta_end; - struct fdasd_anchor anchor; PED_ASSERT (disk != NULL); PED_ASSERT (disk->dev != NULL); @@ -1046,10 +1045,7 @@ dasd_alloc_metadata (PedDisk* disk) backed up, then restored to a larger size disk, etc. */ trailing_meta_start = part->geom.end + 1; - fdasd_initialize_anchor(&anchor); - fdasd_get_geometry(disk->dev, &anchor, arch_specific->fd); trailing_meta_end = (long long) disk->dev->length - 1; - fdasd_cleanup(&anchor); if (trailing_meta_end >= trailing_meta_start) { new_part2 = ped_partition_new (disk,PED_PARTITION_METADATA, NULL, trailing_meta_start, trailing_meta_end);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor