diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2016-01-12 15:32:16 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2016-01-12 15:48:03 +0100 |
commit | ddc6d97f00e81cd422bb4d48adcadff70018de0f (patch) | |
tree | 4e844b8aba02c3e6e6b0eff483a604609918c0b9 | |
parent | 49832fd3943d3551f81e31c9ab8366ff6d8d49b9 (diff) | |
download | NetworkManager-ddc6d97f00e81cd422bb4d48adcadff70018de0f.tar.gz |
dispatcher: only evaluate the number of the scripts if the request is still there
The request could have been completed by the call to complete_request() just above.
In that case we should just return instead of looking for nowait scripts to run.
Core was generated by `/usr/libexec/nm-dispatcher'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f6c916ad0fb in complete_script (script=<error reading variable: value has been optimized out>, script=<error reading variable: value has been optimized out>) at nm-dispatcher.c:349
349 if ( script->request->num_scripts_nowait == 0
(gdb) bt
#0 0x00007f6c916ad0fb in complete_script (script=<error reading variable: value has been optimized out>, script=<error reading variable: value has been optimized out>) at nm-dispatcher.c:349
#1 0x00007f6c8f02d484 in g_child_watch_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at gmain.c:5148
#2 0x00007f6c8f03079a in g_main_context_dispatch (context=0x7f6c9358d9a0) at gmain.c:3109
#3 0x00007f6c8f03079a in g_main_context_dispatch (context=context@entry=0x7f6c9358d9a0) at gmain.c:3708
#4 0x00007f6c8f030ae8 in g_main_context_iterate (context=0x7f6c9358d9a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3779
#5 0x00007f6c8f030dba in g_main_loop_run (loop=0x7f6c9358da80) at gmain.c:3973
#6 0x00007f6c916abcd4 in main (argc=1, argv=0x7ffee4326768) at nm-dispatcher.c:935
(gdb)
Fixes: e97a334e375b936ac66864e6d69ffe75ffa22aa9
https://bugzilla.redhat.com/show_bug.cgi?id=1297826
-rw-r--r-- | callouts/nm-dispatcher.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/callouts/nm-dispatcher.c b/callouts/nm-dispatcher.c index ee972faadf..7106103e30 100644 --- a/callouts/nm-dispatcher.c +++ b/callouts/nm-dispatcher.c @@ -346,8 +346,8 @@ complete_script (ScriptInfo *script) * requests. However, if this was the last "no-wait" script and * there are "wait" scripts ready to run, launch them. */ - if ( script->request->num_scripts_nowait == 0 - && handler->current_request == script->request) { + if ( handler->current_request == script->request + && script->request->num_scripts_nowait == 0) { if (dispatch_one_script (script->request)) return; |