mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tung Quang Nguyen <tung.quang.nguyen@est.tech>
To: "shyckless@gmail.com" <shyckless@gmail.com>
Cc: "horms@kernel.org" <horms@kernel.org>,
	"tipc-discussion@lists.sourceforge.net"
	<tipc-discussion@lists.sourceforge.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"edumazet@kernel.org" <edumazet@kernel.org>,
	"jmaloy@redhat.com" <jmaloy@redhat.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>
Subject: RE: [PATCH net] tipc: restore write readiness when a socket's group goes away
Date: Mon, 23 Nov 2026 04:02:52 +0000	[thread overview]
Message-ID: <AM7P189MB1137026AA0F76C9BA3ADD687C6452@AM7P189MB1137.EURP189.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20261119-tipc-group-open-v1-1-cb725145da51@gmail.com>

>Subject: [PATCH net] tipc: restore write readiness when a socket's group goes
>away
>
>From: Suyuan Wang <stevewong@hust.edu.cn>
>
>tipc_group_create() sets tsk->group_is_open to false, and tipc_poll() only
>reports EPOLLOUT for a socket in TIPC_OPEN state when that flag is true.
>Commit 1b22bcad7e39 ("tipc: correct initial value for group congestion flag")
>made sure the flag is true for sockets that never join a group, since otherwise
>"SOCK_RDM/DGRAM sockets sending datagrams never receive POLLOUT".
>
>The flag is not set back when the group goes away again, though:
>
>- tipc_group_create() clears the flag and then fails when the topology
>  subscription cannot be created, for example when TIPC_MAX_SUBSCR
>  subscriptions exist already;
>- tipc_sk_join() deletes the new group when tipc_sk_publish() fails,
>  for example when the node's publication limit is reached;
>- tipc_sk_leave() deletes the group while the flag may still be false,
>  e.g. because of group congestion, or because the group has no other
>  members yet.
>
>In all three cases the socket is back to an ordinary RDM/DGRAM socket, but
>poll() never reports EPOLLOUT for it again. Before commit
>60c253069632 ("tipc: fix race between poll() and setsockopt()"),
>tipc_poll() also reported EPOLLOUT when tsk->group was NULL, so deleting the
>group was enough; since then the flag has to be reset.
>
>Set tsk->group_is_open to true in these three places, as it is for a socket that
>never had a group, and call sk_write_space() so that a task already waiting for
>EPOLLOUT is woken up, as tipc_sk_filter_rcv() does when a group becomes
>open again.
>

Reviewed-by: Tung Nguyen <tung.quang.nguyen@est.tech>

  reply	other threads:[~2026-11-23  4:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 21:39 Suyuan Wang via B4 Relay
2026-11-23  4:02 ` Tung Quang Nguyen [this message]
2026-11-26  0:10 ` patchwork-bot+netdevbpf

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=AM7P189MB1137026AA0F76C9BA3ADD687C6452@AM7P189MB1137.EURP189.PROD.OUTLOOK.COM \
    --to=tung.quang.nguyen@est.tech \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=jmaloy@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shyckless@gmail.com \
    --cc=tipc-discussion@lists.sourceforge.net \
    /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

all inboxes | Powered by JetHome®