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 198881 Details for
Bug 270421
clurgmgrd crashes when resources are deeply nested
[?]
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]
Caps depth at 12 and increases the query buffer sizes to 1k
restree.c-270421.patch (text/plain), 2.05 KB, created by
Lon Hohberger
on 2007-09-18 21:46:50 UTC
(
hide
)
Description:
Caps depth at 12 and increases the query buffer sizes to 1k
Filename:
MIME Type:
Creator:
Lon Hohberger
Created:
2007-09-18 21:46:50 UTC
Size:
2.05 KB
patch
obsolete
>Index: restree.c >=================================================================== >RCS file: /cvs/cluster/cluster/rgmanager/src/daemons/restree.c,v >retrieving revision 1.10.2.16 >diff -u -r1.10.2.16 restree.c >--- restree.c 2 May 2007 22:54:28 -0000 1.10.2.16 >+++ restree.c 18 Sep 2007 21:45:53 -0000 >@@ -35,6 +35,8 @@ > #include <clulog.h> > #include <assert.h> > >+#define DEPTH_MAX 12 >+ > #ifdef INTERNAL_MALLOC > void malloc_zap_mutex(void); > #endif >@@ -473,7 +475,7 @@ > resource_node_t *parent, > resource_node_t **newnode) > { >- char tok[512]; >+ char tok[1024]; > char *ref; > resource_node_t *node; > resource_t *curres; >@@ -576,15 +578,22 @@ > resource_node_t *parent, > resource_rule_t *rule, > resource_rule_t **rulelist, >- resource_t **reslist, char *base) >+ resource_t **reslist, char *base, int depth) > { >- char tok[512]; >+ char tok[1024]; > resource_rule_t *childrule; > resource_node_t *node; > char *ref; > char *tmp; > int ccount = 0, x = 0, y = 0, flags = 0; > >+ if (depth > DEPTH_MAX) { >+ fprintf(stderr, >+ "Warning: Maximum tree depth exceeded;" >+ " restructuring required\n"); >+ return -1; >+ } >+ > //printf("DESCEND: %s / %s\n", rule?rule->rr_type:"(none)", base); > > /* Pass 1: typed / defined children */ >@@ -646,7 +655,7 @@ > > /* Kaboom */ > build_tree(ccsfd, &node->rn_child, node, childrule, >- rulelist, reslist, tok); >+ rulelist, reslist, tok, ++depth); > > } > } >@@ -735,7 +744,7 @@ > /* Kaboom */ > > build_tree(ccsfd, &node->rn_child, node, childrule, >- rulelist, reslist, tok); >+ rulelist, reslist, tok, ++depth); > } > > //printf("ASCEND: %s / %s\n", rule?rule->rr_type:"(none)", base); >@@ -760,7 +769,7 @@ > { > resource_rule_t *curr; > resource_node_t *root = NULL; >- char tok[512]; >+ char tok[1024]; > > snprintf(tok, sizeof(tok), "%s", RESOURCE_TREE_ROOT); > >@@ -770,7 +779,7 @@ > if (!curr->rr_root) > continue; > >- build_tree(ccsfd, &root, NULL, NULL/*curr*/, rulelist, reslist, tok); >+ build_tree(ccsfd, &root, NULL, NULL/*curr*/, rulelist, reslist, tok, 1); > > } while (!list_done(rulelist, curr)); >
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 270421
:
182861
|
182881
|
182901
| 198881 |
198891