From: Paolo Abeni <pabeni@redhat.com>
To: Mat Martineau <mathew.j.martineau@linux.intel.com>
Cc: Geliang Tang <geliang.tang@suse.com>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next] Revert "mptcp: add data lock for sk timers"
Date: Fri, 06 May 2022 11:19:00 +0200 [thread overview]
Message-ID: <ec6a41422f706bc73075e97df27d437a7bde9c13.camel@redhat.com> (raw)
In-Reply-To: <bdde3a40-1471-c8b9-65bd-f53ddebacdb4@linux.intel.com>
On Thu, 2022-05-05 at 16:40 -0700, Mat Martineau wrote:
> On Thu, 5 May 2022, Paolo Abeni wrote:
>
> > This reverts commit 4293248c6704b854bf816aa1967e433402bee11c.
> >
> > Additional locks are not needed, all the touched sections
> > are already under mptcp socket lock protection.
> >
>
> I agree that this needs to be reverted:
>
> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
>
>
> But msk->sk_timer is *also* accessed in two places without the mptcp
> socket lock (but with the data lock):
> * mptcp_pm_mp_fail_received() (stop timer when mp_fail received)
>
> * subflow_check_data_avail() (start timer on infinite mapping rx)
I'm reasonably no additional lock is required to call sk_stop_timer()
and/or sk_reset_timer(): they boil down to the timer_{del,mod}
primitives which in turns are irq safe.
The mptcp wrappers *could* require additional locking because they
additionally touch mptcp_sk(sk)->timer_ival. I *think* we could avoid
the lock even there with some additional barrier, but it looks every
caller is already under the lock.
I think we don't need to defer touching the timer. Eventully we could
remove the check on the msk socket status, which again looks not
needed.
Cheers,
Paolo
next prev parent reply other threads:[~2022-05-06 9:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 17:12 [PATCH mptcp-next] Revert "mptcp: add data lock for sk timers" Paolo Abeni
2022-05-05 18:38 ` Revert "mptcp: add data lock for sk timers": Tests Results MPTCP CI
2022-05-05 23:40 ` [PATCH mptcp-next] Revert "mptcp: add data lock for sk timers" Mat Martineau
2022-05-06 9:19 ` Paolo Abeni [this message]
2022-05-06 19:10 ` Matthieu Baerts
2022-05-10 0:11 ` Mat Martineau
2022-05-10 14:04 ` Matthieu Baerts
2022-05-11 20:40 ` Mat Martineau
2022-05-16 16:13 ` Matthieu Baerts
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=ec6a41422f706bc73075e97df27d437a7bde9c13.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=geliang.tang@suse.com \
--cc=mathew.j.martineau@linux.intel.com \
--cc=mptcp@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox