mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
af_unix: Replace garbage collection algorithm.
If we find a dead SCC during iteration, we call unix_collect_skb() to splice all skb in the SCC to the global sk_buff_head, hitlist. After iterating all SCC, we unlock unix_gc_lock and purge the queue. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Acked-by: Paolo Abeni <pabeni@redhat.com> Link: https://lore.kernel.org/r/20240325202425.60930-15-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
a15702d8b3
commit
4090fa373f
@@ -19,9 +19,6 @@ static inline struct unix_sock *unix_get_socket(struct file *filp)
|
||||
|
||||
extern spinlock_t unix_gc_lock;
|
||||
extern unsigned int unix_tot_inflight;
|
||||
|
||||
void unix_inflight(struct user_struct *user, struct file *fp);
|
||||
void unix_notinflight(struct user_struct *user, struct file *fp);
|
||||
void unix_add_edges(struct scm_fp_list *fpl, struct unix_sock *receiver);
|
||||
void unix_del_edges(struct scm_fp_list *fpl);
|
||||
void unix_update_edges(struct unix_sock *receiver);
|
||||
@@ -85,12 +82,7 @@ struct unix_sock {
|
||||
struct sock *peer;
|
||||
struct sock *listener;
|
||||
struct unix_vertex *vertex;
|
||||
struct list_head link;
|
||||
unsigned long inflight;
|
||||
spinlock_t lock;
|
||||
unsigned long gc_flags;
|
||||
#define UNIX_GC_CANDIDATE 0
|
||||
#define UNIX_GC_MAYBE_CYCLE 1
|
||||
struct socket_wq peer_wq;
|
||||
wait_queue_entry_t peer_wake;
|
||||
struct scm_stat scm_stat;
|
||||
|
||||
Reference in New Issue
Block a user