--- x/net/unix/garbage.c +++ y/net/unix/garbage.c @@ -205,6 +205,7 @@ void unix_add_edges(struct scm_fp_list * edge = fpl->edges + i++; edge->predecessor = inflight; edge->successor = receiver; + sock_hold((struct sock *)receiver); unix_add_edge(fpl, edge); } while (i < fpl->count_unix); @@ -225,6 +226,7 @@ void unix_del_edges(struct scm_fp_list * { struct unix_sock *receiver; int i = 0; + int j; spin_lock(&unix_gc_lock); @@ -246,6 +248,12 @@ out: spin_unlock(&unix_gc_lock); fpl->inflight = false; + + for (j = 0; j < i; j++) { + struct unix_edge *edge = fpl->edges + j; + + sock_put((struct sock *)(edge->successor)); + } } void unix_update_edges(struct unix_sock *receiver)