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 887401 Details for
Bug 1088865
systemd: Assertion 'path' failed at ../src/shared/cgroup-util.c:915, function cg_is_empty_recursive()
[?]
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 remove keys from hashmap during deserialization
0001-Make-sure-that-keys-are-properly-removed-from-hashma.patch (text/plain), 1.74 KB, created by
Zbigniew Jędrzejewski-Szmek
on 2014-04-18 02:46:54 UTC
(
hide
)
Description:
patch to remove keys from hashmap during deserialization
Filename:
MIME Type:
Creator:
Zbigniew Jędrzejewski-Szmek
Created:
2014-04-18 02:46:54 UTC
Size:
1.74 KB
patch
obsolete
>From e45c458281564fbfeb804a6ab4d9d4bfd76db66e Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> >Date: Thu, 17 Apr 2014 22:12:25 -0400 >Subject: [PATCH] Make sure that keys are properly removed from hashmap > >This is a speculative fix for https://bugzilla.redhat.com/show_bug.cgi?id=1088865. >Even though I cannot find a code path that where this would be >an issue, for consistency, if we assume that cgroup_path might have >been set before we got to unit_deserialize, we should make sure that >the unit is removed from the hashmap before we free the key. This seems >to be the only place where the key could be prematurely freed, leading to >hashmap corruption. >--- > src/core/unit.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/src/core/unit.c b/src/core/unit.c >index 153b79b..6ce91ba 100644 >--- a/src/core/unit.c >+++ b/src/core/unit.c >@@ -2487,10 +2487,18 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) { > if (!s) > return -ENOMEM; > >- free(u->cgroup_path); >- u->cgroup_path = s; >+ if (u->cgroup_path) { >+ void *p; >+ >+ p = hashmap_remove(u->manager->cgroup_unit, u->cgroup_path); >+ log_info("Removing cgroup_path %s from hashmap (%p)", >+ u->cgroup_path, p); >+ free(u->cgroup_path); >+ } > >+ u->cgroup_path = s; > assert(hashmap_put(u->manager->cgroup_unit, s, u) == 1); >+ > continue; > } > >-- >1.8.5.2 >
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 1088865
: 887401