diff options
Diffstat (limited to 'net/unix/garbage.c')
-rw-r--r-- | net/unix/garbage.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/unix/garbage.c b/net/unix/garbage.c index 9b8473dd79a4..3e4b986de94b 100644 --- a/net/unix/garbage.c +++ b/net/unix/garbage.c @@ -339,6 +339,17 @@ static void __unix_gc(struct work_struct *work) /* Here we are. Hitlist is filled. Die. */ __skb_queue_purge(&hitlist); +#if IS_ENABLED(CONFIG_AF_UNIX_OOB) + list_for_each_entry_safe(u, next, &gc_candidates, link) { + struct sk_buff *skb = u->oob_skb; + + if (skb) { + u->oob_skb = NULL; + kfree_skb(skb); + } + } +#endif + spin_lock(&unix_gc_lock); /* All candidates should have been detached by now. */ |