Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 294068 Details for
Bug 427550
dmraid segfaults on boot resulting in broken mirror
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to prevent SEGV when activting raid set
dmraid-1.0.0.rc14-ddf1_group_info.patch (text/plain), 1.97 KB, created by
Ian Kent
on 2008-02-06 02:06:50 UTC
(
hide
)
Description:
Patch to prevent SEGV when activting raid set
Filename:
MIME Type:
Creator:
Ian Kent
Created:
2008-02-06 02:06:50 UTC
Size:
1.97 KB
patch
obsolete
>--- current/lib/format/ddf/ddf1.c.orig 2006-11-07 13:03:22.000000000 +0100 >+++ current/lib/format/ddf/ddf1.c 2008-02-04 11:00:15.000000000 +0100 >@@ -19,6 +19,18 @@ > #include "ddf1_cvt.h" > #include "ddf1_dump.h" > >+#define GRP_RD(rd) \ >+ (((struct ddf1_group_info *) (rd)->private.ptr)->rd_group) >+ >+/* >+ * Helper struct to squirrel a group set reference to the check method >+ * in order to avoid, that premature deallocation in metadata.c >+ * removes the group set. >+ */ >+struct ddf1_group_info { >+ struct raid_dev *rd_group; >+}; >+ > static const char *handler = HANDLER; > > #define DDF1_SPARES ".ddf1_spares" >@@ -595,8 +607,10 @@ > /* Sort DDF1 devices by offset entry within a RAID set. */ > static int dev_sort(struct list_head *pos, struct list_head *new) > { >- return compose_id(META(RD(new)->private.ptr, ddf1), RD(new)) < >- compose_id(META(RD(pos)->private.ptr, ddf1), RD(pos)); >+ struct raid_dev *rd_pos = RD(pos), *rd_new = RD(new); >+ >+ return compose_id(META(GRP_RD(rd_new), ddf1), rd_new) < >+ compose_id(META(GRP_RD(rd_pos), ddf1), rd_pos); > } > > /* >@@ -705,6 +719,7 @@ > struct raid_dev *rd; > struct ddf1_config_record *cr; > struct ddf1_phys_drive *pd; >+ struct ddf1_group_info *gi; > unsigned int devs, i; > > if (!(pd = get_phys_drive(ddf1))) >@@ -746,8 +761,14 @@ > return NULL; > } > >+ if (!(gi = alloc_private(lc, handler, sizeof(*gi)))) { >+ free_raid_dev(lc, &rd); >+ return NULL; >+ } >+ > /* Keep reference to the entire device for ddf1_check() */ >- rd->private.ptr = rd_group; >+ rd->private.ptr = gi; >+ GRP_RD(rd) = rd_group; > > /* Add rest of subset state */ > rs->stride = stride(cr); >@@ -825,13 +846,8 @@ > { > /* Get the logical drive */ > struct ddf1_config_record *cr = >- get_this_config(META(rd->private.ptr, ddf1), rd->offset); >+ get_this_config(META(GRP_RD(rd), ddf1), rd->offset); > >- /* >- * Release reference after check, so that core >- * doesn't try to free it multiple times. >- */ >- rd->private.ptr = NULL; > return cr ? cr->primary_element_count : 0; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 427550
: 294068