@@ -145,7 +145,7 @@ static void scan_children(struct sock *x, void (*func)(struct unix_sock *),
145
145
/* An embryo cannot be in-flight, so it's safe
146
146
* to use the list link.
147
147
*/
148
- BUG_ON (!list_empty (& u -> link ));
148
+ WARN_ON_ONCE (!list_empty (& u -> link ));
149
149
list_add_tail (& u -> link , & embryos );
150
150
}
151
151
spin_unlock (& x -> sk_receive_queue .lock );
@@ -213,8 +213,8 @@ static void __unix_gc(struct work_struct *work)
213
213
214
214
total_refs = file_count (u -> sk .sk_socket -> file );
215
215
216
- BUG_ON (!u -> inflight );
217
- BUG_ON (total_refs < u -> inflight );
216
+ WARN_ON_ONCE (!u -> inflight );
217
+ WARN_ON_ONCE (total_refs < u -> inflight );
218
218
if (total_refs == u -> inflight ) {
219
219
list_move_tail (& u -> link , & gc_candidates );
220
220
__set_bit (UNIX_GC_CANDIDATE , & u -> gc_flags );
@@ -294,7 +294,7 @@ static void __unix_gc(struct work_struct *work)
294
294
list_move_tail (& u -> link , & gc_inflight_list );
295
295
296
296
/* All candidates should have been detached by now. */
297
- BUG_ON (!list_empty (& gc_candidates ));
297
+ WARN_ON_ONCE (!list_empty (& gc_candidates ));
298
298
299
299
/* Paired with READ_ONCE() in wait_for_unix_gc(). */
300
300
WRITE_ONCE (gc_in_progress , false);
0 commit comments