mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-05 08:00:15 +01:00
ndisc: keep NMNDisc instance alive while processing IO in event_ready()
event_ready() calls ndp_callall_eventfd_handler(), which invokes our own callback, which may invoke change notification. At that point, it's not guaranteed that the signal handler won't destroy the ndisc instance, which means, the "struct ndp" gets destroyed while invoking callbacks. That's bad, because libndp is not robust against that. Ensure the object stays alive long enough.
This commit is contained in:
parent
1f856b7cb3
commit
9aa628cedb
1 changed files with 1 additions and 0 deletions
|
|
@ -491,6 +491,7 @@ receive_rs (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
|
|||
static gboolean
|
||||
event_ready (GIOChannel *source, GIOCondition condition, NMNDisc *ndisc)
|
||||
{
|
||||
gs_unref_object NMNDisc *ndisc_keep_alive = g_object_ref (ndisc);
|
||||
nm_auto_pop_netns NMPNetns *netns = NULL;
|
||||
NMLndpNDiscPrivate *priv = NM_LNDP_NDISC_GET_PRIVATE ((NMLndpNDisc *) ndisc);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue