On Mon, 10 Jul 2023, Paolo Abeni wrote:
> Currently the mptcp code generate a "new listener" event even
> if the actual listen() syscall fails. Address the issue moving
> the event generation call under the successful branch.
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> this could possibly go via -net, but is used by later patches and
> is not really critical IMHO.
> Eventually the additional tag would be:
> Fixes: f8c9dfbd875b ("mptcp: add pm listener events")
I replied deeper in the thread about applying this patch to -net, but I
need to tag it too:
Reviewed-by: Mat Martineau <martineau@kernel.org>
> ---
> net/mptcp/protocol.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 497bc17b5223..8b5c78f582f7 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -3762,10 +3762,9 @@ static int mptcp_listen(struct socket *sock, int backlog)
> if (!err) {
> sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
> mptcp_copy_inaddrs(sk, ssock->sk);
> + mptcp_event_pm_listener(ssock->sk, MPTCP_EVENT_LISTENER_CREATED);
> }
>
> - mptcp_event_pm_listener(ssock->sk, MPTCP_EVENT_LISTENER_CREATED);
> -
> unlock:
> release_sock(sk);
> return err;
> --
> 2.41.0
>
>
>