mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 11:30:12 +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. (cherry picked from commit9aa628cedb) (cherry picked from commitefb9e2bc6b) (cherry picked from commit2ba6d74bca)
This commit is contained in:
parent
391587731c
commit
9a06bb2b7b
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