From: Paolo Abeni <pabeni at redhat.com>
To: mptcp at lists.01.org
Subject: Re: [MPTCP] [RFC] mptcp: Implement interim path manager
Date: Mon, 26 Aug 2019 17:20:28 +0200 [thread overview]
Message-ID: <73e8a5be4a72c404d0d2b956c361f0743594face.camel@redhat.com> (raw)
In-Reply-To: 20190807225443.3051-1-peter.krystad@linux.intel.com
[-- Attachment #1: Type: text/plain, Size: 950 bytes --]
On Wed, 2019-08-07 at 15:54 -0700, Peter Krystad wrote:
> @@ -91,16 +95,32 @@ int pm_remove_subflow(u32 token, u8 remote_id)
>
> void pm_new_connection(struct mptcp_sock *msk, int server_side)
> {
> - pr_debug("msk=%p", msk);
> + struct mptcp_pm_data *pm = &msk->pm;
> +
> + pr_debug("msk=%p, token=%u", msk, msk->token);
>
> - msk->pm.server_side = server_side;
> + pm->server_side = server_side;
> + pm->token = msk->token;
> +
> + /* trigger announce address in interim local path manager */
> + if (pm->server_side) {
> + INIT_WORK(&pm->addr_work, announce_addr_worker);
> + queue_work(mptcp_wq, &pm->addr_work);
I think that here we need to acquire a reference to the related msk
socket, or we can get use-after-free depending on socket shutdown and
workqueue scheduling.
Such reference should be releases by the worker itself.
Other workqueue usage below should need a similar change.
Cheers,
Paolo
next reply other threads:[~2019-08-26 15:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 15:20 Paolo Abeni [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-08-27 19:56 [MPTCP] [RFC] mptcp: Implement interim path manager Peter Krystad
2019-08-07 22:54 Peter Krystad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=73e8a5be4a72c404d0d2b956c361f0743594face.camel@redhat.com \
--to=unknown@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.