Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15:Update
parted
0004-fdasd.c-Safeguard-against-geometry-misprob...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0004-fdasd.c-Safeguard-against-geometry-misprobing.patch of Package parted
From: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com> Date: Fri, 5 Feb 2016 14:47:11 +0100 Subject: fdasd.c: Safeguard against geometry misprobing References: fate#320525 / bsc#935127 Patch-mainline: v3.3 Git-commit: 8c6de55e4375bd63ae0d0dc7dd7104a7c2290cac Fixes an issue with parted print being run against a logical volume realised by extents on a physical volume residing on a DASD. We must make sure that geometry, device blocksize and DASD attributes are present before we start format verifications If any of it is missing this is not a DASD. Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com> Signed-off-by: Brian C. Lane <bcl@redhat.com> Acked-by: Sebastian Parschauer <sparschauer@suse.de> --- libparted/labels/fdasd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) --- a/libparted/labels/fdasd.c +++ b/libparted/labels/fdasd.c @@ -1021,13 +1021,20 @@ fdasd_get_geometry (const PedDevice *dev goto error; } - if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0) + if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0 || + anc->geo.heads == 0 || + anc->geo.sectors == 0 || + anc->geo.cylinders == 0 ) { fdasd_error(anc, unable_to_ioctl, _("Could not retrieve disk geometry information.")); + goto error; + } - if (ioctl(f, BLKSSZGET, &blksize) != 0) + if (ioctl(f, BLKSSZGET, &blksize) != 0) { fdasd_error(anc, unable_to_ioctl, _("Could not retrieve blocksize information.")); + goto error; + } /* get disk type */ if (ioctl(f, BIODASDINFO, &dasd_info) != 0) {
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