File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,9 @@ enum unix_socket_lock_class {
85
85
U_LOCK_NORMAL ,
86
86
U_LOCK_SECOND , /* for double locking, see unix_state_double_lock(). */
87
87
U_LOCK_DIAG , /* used while dumping icons, see sk_diag_dump_icons(). */
88
+ U_LOCK_GC_LISTENER , /* used for listening socket while determining gc
89
+ * candidates to close a small race window.
90
+ */
88
91
};
89
92
90
93
static inline void unix_state_lock_nested (struct sock * sk ,
Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ static void __unix_gc(struct work_struct *work)
299
299
__set_bit (UNIX_GC_MAYBE_CYCLE , & u -> gc_flags );
300
300
301
301
if (sk -> sk_state == TCP_LISTEN ) {
302
- unix_state_lock (sk );
302
+ unix_state_lock_nested (sk , U_LOCK_GC_LISTENER );
303
303
unix_state_unlock (sk );
304
304
}
305
305
}
You can’t perform that action at this time.
0 commit comments