summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@google.com>2025-11-15 05:08:36 +0300
committerJakub Kicinski <kuba@kernel.org>2025-11-19 06:19:31 +0300
commite29c7a4cec867f9d860b8ff3da0fc44c7177876a (patch)
treee961e6ad429c138b2d7818f28e2365657d6c40f2 /include/linux/debugobjects.h
parent384900542dc85f3aac7918fea8e7ef62141e3ea6 (diff)
downloadlinux-e29c7a4cec867f9d860b8ff3da0fc44c7177876a.tar.xz
af_unix: Refine wait_for_unix_gc().
unix_tot_inflight is a poor metric, only telling the number of inflight AF_UNXI sockets, and we should use unix_graph_state instead. Also, if the receiver is catching up with the passed fds, the sender does not need to schedule GC. GC only helps unreferenced cyclic SCM_RIGHTS references, and in such a situation, the malicious sendmsg() will continue to call wait_for_unix_gc() and hit the UNIX_INFLIGHT_SANE_USER condition. Let's make only malicious users schedule GC and wait for it to finish if a cyclic reference exists during the previous GC run. Then, sane users will pay almost no cost for wait_for_unix_gc(). Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20251115020935.2643121-6-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions