Summary: | [PATCH] Fix a race condition when terminating runaway_killer_thread | ||
---|---|---|---|
Product: | PolicyKit | Reporter: | Miloslav Trmac <mitr> |
Component: | daemon | Assignee: | David Zeuthen (not reading bugmail) <zeuthen> |
Status: | RESOLVED FIXED | QA Contact: | David Zeuthen (not reading bugmail) <zeuthen> |
Severity: | normal | ||
Priority: | medium | CC: | rstrode |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
0001-Fix-a-race-condition-when-terminating-runaway_killer.patch
0001-Fix-a-race-condition-when-terminating-runaway_killer.patch |
Description
Miloslav Trmac
2016-05-21 01:10:50 UTC
Created attachment 123948 [details] [review] 0001-Fix-a-race-condition-when-terminating-runaway_killer.patch Created attachment 123949 [details] [review] 0001-Fix-a-race-condition-when-terminating-runaway_killer.patch i noticed this problem too running the test suite. I think a more surgical fix would be to start the main loop in the "running" state (e.g. change the FALSE argument to g_main_loop_new to TRUE) and then check g_main_loop_is_running before calling g_main_loop_run. That was the first possible fix that popped into my head anyway. But "more surgical" isn't better in this case, I think, though. You're patch simplifies the code and just seems all around better than what I'm proposing above. Seems to work great. pushing it to master. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.