Bug 1615271

Summary: dmraid bug
Product: [Fedora] Fedora Reporter: Harald Hoyer <harald>
Component: dmraidAssignee: LVM and device-mapper development team <lvm-team>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: agk, bmr, cfeist, heinzm, kzak, lvm-team, mcsontos, prajnoha, prockai, zkabelac
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dmraid-1.0.0.rc16-38.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-16 08:07:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Harald Hoyer 2018-08-13 08:23:53 UTC
There is a bug in the Fedora specific patches:


$ git diff
diff --git a/dmraid-fix-errors-and-warnings-triggered-by-CFLAGS.patch b/dmraid-fix-errors-and-warnings-triggered-by-CFLAGS.patch
index dc55b39..62ac393 100644
--- a/dmraid-fix-errors-and-warnings-triggered-by-CFLAGS.patch
+++ b/dmraid-fix-errors-and-warnings-triggered-by-CFLAGS.patch
@@ -58,7 +58,7 @@ index 4da6b64..14dc459 100644
                list_add_tail(&rd->devs, &rs->devs);
                n++;
 -      } while (end++ != '\0');
-+      } while (*end++ != '\0');
++      } while ((end != NULL) && *(++end) != '\0');
  
        rs->total_devs = rs->found_devs = n;
        rs_tmp = rs;


without the patch dmraid fails:

# dmraid -f isw -C Test0 --type 1 --disk "/dev/sdb /dev/sdc"
ERROR: isw: the RAID set cannot have less than 2 hard drives

With the patch creating the RAID succeeds.

It's a logical bug because remove_delimiter() returns NULL

Comment 2 Marian Csontos 2018-08-14 16:09:50 UTC
Good catch Harald! Thank you!

My fault! Though the type suggests the original is missing dereferencing, it is actually equivalent to correct `}| while (end++ != NULL)`

Comment 4 Fedora Update System 2018-08-14 16:44:39 UTC
dmraid-1.0.0.rc16-38.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-bdca689e22

Comment 5 Fedora Update System 2018-08-14 22:43:04 UTC
dmraid-1.0.0.rc16-38.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-bdca689e22

Comment 6 Fedora Update System 2018-08-16 08:07:06 UTC
dmraid-1.0.0.rc16-38.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.