NetworkManager/shared/nm-glib-aux
Thomas Haller 1a68a54471
shared: fix race in nm_ref_string_unref()
We cannot drop the reference count to zero while having
no lock. Otherwise, another thread might race doing

  s = nm_ref_string_new("...");
  nm_ref_string_unref(s);

and already successfully delete the instance.

Hitting this race should be rather difficult, especially because
we tend to use NMRefString only from one thread. But still, access
to global variables must be race free.

Fixes: 908fadec96 ('shared: add NMRefString')
(cherry picked from commit 3490a09a7d)
2020-12-10 12:06:05 +01:00
..
tests all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-c-list.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dbus-aux.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dbus-aux.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dedup-multi.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dedup-multi.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-enum-utils.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-enum-utils.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-errno.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-errno.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-glib.h shared: also reimplement g_atomic_pointer_set() macro 2020-11-23 15:26:48 +01:00
nm-hash-utils.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-hash-utils.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-io-utils.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-io-utils.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-jansson.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-json-aux.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-json-aux.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-keyfile-aux.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-keyfile-aux.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-logging-base.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-logging-base.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-logging-fwd.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-macros-internal.h shared: fix NM_CAST_STRV_CC() for "char **const" pointers 2020-10-19 23:04:52 +02:00
nm-obj.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-random-utils.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-random-utils.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-ref-string.c shared: fix race in nm_ref_string_unref() 2020-12-10 12:06:05 +01:00
nm-ref-string.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-secret-utils.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-secret-utils.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-shared-utils.c shared: introduce opaque type NMUtilsUserData for nm_utils_user_data_pack() 2020-10-22 20:54:43 +02:00
nm-shared-utils.h shared: introduce opaque type NMUtilsUserData for nm_utils_user_data_pack() 2020-10-22 20:54:43 +02:00
nm-str-buf.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-time-utils.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-time-utils.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-value-type.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00