From: Nam Cao <namcao@linutronix.de>
To: sashiko-reviews@lists.linux.dev
Cc: Kuniyuki Iwashima <kuniyu@google.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rt-devel@lists.linux.dev
Cc: linux-rt-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/3] af_unix: Do not wait for garbage collector in sendmsg()
Date: Mon, 20 Jul 2026 09:26:26 +0200 [thread overview]
Message-ID: <878q76f7fh.fsf@yellow.woof> (raw)
In-Reply-To: <20260718062737.8463C1F00A3D@smtp.kernel.org>
sashiko-bot@kernel.org writes:
> [Severity: High]
> Does removing the unix_schedule_gc() call from unix_prepare_fpl() prevent
> proactive garbage collection of cyclic AF_UNIX file descriptors?
>
> If a long-running application creates a cycle of AF_UNIX sockets and closes
> its own file descriptors to them, the cycle maintains a positive f_count.
> Without this call triggering the garbage collector, the uncollected cyclic
> sockets could accumulate until the application reaches its RLIMIT_NOFILE
> quota, causing subsequent socket operations to fail.
Yes. But an application that creates a huge dead circle of AF_UNIX
sockets is already shady.
And keep scheduling the garbage collector can cause CPU consumption for
nothing, as shown in the v1 thread.
> Additionally, does this change leave the user parameter logic in
> unix_schedule_gc() as dead code?
Yes. That is cleaned up by PATCH 3/3.
Nam
next prev parent reply other threads:[~2026-07-20 7:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 6:27 [PATCH net-next v2 0/3] af_unix: Fix priority inversion issue Nam Cao
2026-07-17 6:27 ` [PATCH net-next v2 1/3] af_unix: Schedule the garbage collector at task exit Nam Cao
2026-07-17 6:45 ` Nam Cao
2026-07-18 6:27 ` sashiko-bot
2026-07-20 7:16 ` Nam Cao
2026-07-17 6:27 ` [PATCH net-next v2 2/3] af_unix: Do not wait for garbage collector in sendmsg() Nam Cao
2026-07-18 6:27 ` sashiko-bot
2026-07-20 7:26 ` Nam Cao [this message]
2026-07-17 6:27 ` [PATCH net-next v2 3/3] af_unix: Clean up unix_schedule_gc() Nam Cao
2026-07-18 6:27 ` sashiko-bot
2026-07-20 7:43 ` Nam Cao
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=878q76f7fh.fsf@yellow.woof \
--to=namcao@linutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sashiko-reviews@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 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.