Bug 1615271 - dmraid bug
Summary: dmraid bug
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dmraid
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: LVM and device-mapper development team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-13 08:23 UTC by Harald Hoyer
Modified: 2018-08-16 08:07 UTC (History)
10 users (show)

Fixed In Version: dmraid-1.0.0.rc16-38.fc28
Clone Of:
Environment:
Last Closed: 2018-08-16 08:07:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.