mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 04:10:17 +01:00
connectivity: don't clear "concheck.resolve_cancellable" early in systemd_resolved_resolve_cb()
This can lead to a crash. The code might continue to call system_resolver_resolve(), then it has no more cancellable. That means, if the task gets cancelled, then the callback will still return and result in a crash. There is no need to cancel or clear the cancellable during normal operation. It will be cleaned up at the end. This leads to an assertion error (or possibly crash): ... #6 0x00005584ff461e67 in system_resolver_resolve_cb (source_object=<optimized out>, res=0x5585016b9190, user_data=user_data@entry=0x558501667800) at src/core/nm-connectivity.c:798 #7 0x00007f348a02419a in g_task_return_now (task=0x5585016b9190) at ../gio/gtask.c:1219 #8 0x00007f348a0241dd in complete_in_idle_cb (task=task@entry=0x5585016b9190) at ../gio/gtask.c:1233 #9 0x00007f3489e263eb in g_idle_dispatch (source=0x7f3464001070, callback=0x7f348a0241d0 <complete_in_idle_cb>, user_data=0x5585016b9190) at ../glib/gmain.c:5897 ... Fixes:57d226d3f0('connectivity: resolve hostname ourselves to avoid blocking libcurl') (cherry picked from commit62b1f9766a)
This commit is contained in:
parent
a66e054bd6
commit
64e65d35b3
1 changed files with 0 additions and 2 deletions
|
|
@ -884,8 +884,6 @@ systemd_resolved_resolve_cb(GObject *object, GAsyncResult *res, gpointer user_da
|
|||
|
||||
cb_data = user_data;
|
||||
|
||||
g_clear_object(&cb_data->concheck.resolve_cancellable);
|
||||
|
||||
if (!result) {
|
||||
/* Never mind. Fallback to the system resolver. */
|
||||
_LOG2D("can't resolve a name via systemd-resolved: %s", error->message);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue